When a new topic is created through the WP Discourse plugin, the plugin is sending a wp-id (with a hyphen) parameter to Discourse. It’s been doing this since before I started working on the plugin. It doesn’t seem that it’s used anywhere in Discourse.
Having a wp_id property for topics that are created through WordPress would be useful for syncing updated content between Discourse and WordPress. The way I’m doing this at the moment is to make a request to a Discourse route that’s been added through a plugin. The request is returning the topic_id, title, and posts_count for all topics that have a topic_embed that have been updated within a given time range.
On the WordPress end, the difficulty is matching the returned data with the WordPress post. It can be done with the data that’s being returned, but its a somewhat expensive query. If a wp_id property was added to topics that were created through WordPress, the process would be more efficient.
Would it be possible for this to be added to Discourse?