# WP Discourse 1.4.0 Release

**URL:** https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283
**Category:** Extras
**Tags:** wordpress
**Created:** [June 28, 2017, 5:49pm UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283 "2017-06-28T17:49:23Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [June 28, 2017, 5:49pm UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/1 "2017-06-28T17:49:23Z")

</div>

Version 1.4.0 of the [WP Discourse](https://github.com/discourse/wp-discourse) is now available in the [WordPress plugin repository](https://en-ca.wordpress.org/plugins/wp-discourse/). The code is also on [GitHub](https://github.com/discourse/wp-discourse).

The big changes in this release are adding an option to sync Discourse topics to their associated WordPress posts with a webhook, and adding support for connecting a single Discourse forum to a WordPress multisite network. Check out the [Webhook Settings](https://meta.discourse.org/t/wp-discourse-plugin-installation-and-setup/50752#wpdc-webhook-settings) and [Multisite Support](https://meta.discourse.org/t/wp-discourse-plugin-installation-and-setup/50752#wpdc-multisite-support) sections of the [WP Discourse installation and setup](https://meta.discourse.org/t/wp-discourse-plugin-installation-and-setup/50752) topic for details about both of these features.

Other changes include:

- adding a featured\_link option to the Publish options - thanks @iamntz! I’m finding this works very well with a customized `publish_format_html` template that removes the `{blog_url}` template tag.

- adding an option to not display the Discourse Name field on the WordPress user’s profile page. Enabling this will cause all posts to be published by the name supplied in the publishing\_username field.

- removing the debug\_mode option and adding a `wpdc_comment_sync_period` filter that can be used in its place. The problem with the debug\_mode option was that if it was left checked by mistake, it would have a huge impact on the plugin’s performance. If people are missing this option, it could be added back, but changed so that it’s only enabled for a single request.

#### Comment sync period filter example

Unless you are using a webhook to sync comments, the plugin defaults to syncing comments every 10 minutes. To change the sync period, you can do something like this:

```php
// Sync comments once every hour.
add_filter( 'wpdc_comment_sync_period', 'my_namespace_sync_period' );
function my_namespace_sync_period( $sync_period ) {

	return 60 * 60; // 60 seconds * 60 minutes.
}

```

#### Coming Soon

- a webhook option to automatically populate the Discourse Name field with the Discourse username. This will be able to be used when WordPress is the SSO provider for your forum, or when, through some other login system, you can guarantee that the user credentials on Discourse and WordPress match.

Let me know if you have any problems with the update. Previous versions of the plugin can be downloaded from the bottom of this page: [https://en-ca.wordpress.org/plugins/wp-discourse/advanced/](https://en-ca.wordpress.org/plugins/wp-discourse/advanced/)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 11, 2017, 2:06am UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/2 "2017-07-11T02:06:21Z")

</div>

[WP Discourse](https://github.com/discourse/wp-discourse) version 1.4.15 is now in the WordPress plugin repo. The biggest change is that there is now a network options page for multisite installations. It can be accessed through the Dashboard of the Network Admin section on multisite installations. If you enable the Multisite Configuration option on that page, you can set some options for all sites on the network. The Multisite Configuration option is only to be used for the case of a single Discourse forum connecting to a network of WordPress sites.

If you have enabled the Multisite Configuration option in version 1.4.0 of the plugin, the site options should be automatically transferred to the new options page.

Using WordPress as either the SSO Provider or the SSO Client is now possible when the Multisite Configuration option is enabled.

For single and multisite installations, an Update Userdata webhook endpoint has been added. Out of the box, it is only active for sites that are using WordPress as the SSO provider for Discourse. It is useful for automatically populating the Discourse Username field on the WordPress user’s profile when a user is first created on Discourse. If you have a reason to use this webhook without enabling SSO, that can be done by hooking a function into the `wpdc_use_discourse_user_webhook` filter.

Todo:

- add a non-webhook option for syncing user data
- rework the email verification system for multisite setups - with the default WordPress multisite setup, user’s email addresses are being verified by WordPress, but they are still having to reverify them when they login to Discourse for the first time.
- rework the auto login feature

As always, older versions of the plugin are available from the bottom of this page: [WP Discourse (advanced view) – WordPress plugin | WordPress.org English (Canada)](https://en-ca.wordpress.org/plugins/wp-discourse/advanced/)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 11, 2017, 8:38pm UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/3 "2017-07-11T20:38:22Z")

</div>

Version 1.4.2 is a minor update that fixes a bug with the auto-login SSO feature. If that feature is enabled, the plugin now checks its connection status with Discourse before attempting to log the user into Discourse.

It also allows a `skip_autologin` query parameter to be added to the WordPress login URL. This is useful if SSO between WordPress and Discourse is misconfigured and you need to login to your WordPress site. You can do it with a URL like this:

`http://example.com/wp-login.php?skip_autologin`

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [July 11, 2017, 9:48pm UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/4 "2017-07-11T21:48:24Z")

</div>

You should stick to semantic versioning. The “1.4.15” release should’ve just been the “1.4.2” release, no matter how small the patch may be. Otherwise you mess with GitHub’s releases chronology and potentially other stuff.

---

<div class="post-metadata">

### Author: ![jetatomic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jetatomic/32/42202_2.png) [@jetatomic](https://meta.discourse.org/u/jetatomic)
#### Post date: [July 24, 2017, 11:49pm UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/5 "2017-07-24T23:49:11Z")

</div>

Continuing the discussion from [WP Discourse plugin installation and setup](https://meta.discourse.org/t/wp-discourse-plugin-installation-and-setup/50752/18):

> [@Install and configure the WP Discourse Wordpress plugin for Discourse](https://meta.discourse.org/t/install-and-configure-the-wp-discourse-wordpress-plugin-for-discourse/50752/17):
>
> Okay, I do see the multisite config in the main site Connections under the Discourse tab. I had been looking in network admin, and the subsites… didn’t think to check ID 1 settings. The Discourse tab also shows on the other subsites, but without the multisite config checkbox.

> [@Install and configure the WP Discourse Wordpress plugin for Discourse](https://meta.discourse.org/t/install-and-configure-the-wp-discourse-wordpress-plugin-for-discourse/50752/18):
>
> Great! That’s how it should be. If you select the Multisite Configuration option the Connection settings (API key etc.), Webhook options, and Enable SSO options will be set for all your subsites off of the main site. It will also create the database table that’s used to associate posts with blog\_ids.
> 
> If you don’t select the Multisite Configuration option, those settings can be made individually for each subsite. The best approach to take really depends on how many subsites you have. If you would like to use webhooks and you have 100 subsites, without selecting the Multisite Configuration option, you’d have to setup 100 webhooks. I don’t think that would be a great idea.

After upgrading to 1.4.2, the _Multisite Configuration_ option no longer appears in the Connection Settings on my main site. Did this functionality change intentionally between 1.4.0 and .2, or is something amiss on my install?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 24, 2017, 11:58pm UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/6 "2017-07-24T23:58:23Z")

</div>

> [@jetatomic](#):
>
> After upgrading to 1.4.2, the Multisite Configuration option no longer appears in the Connection Settings on my main site.

Did you see a notice telling you that the plugin’s network settings have been transferred to the Network Admin dashboard? It would only appear for you if you had enabled the Multisite Configuration option in version 1.4.0.

The network admin options for the plugin can now be found at Network Admin/Dashboard/Discourse. Let me know if you have any problems with this.

---

<div class="post-metadata">

### Author: ![jetatomic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jetatomic/32/42202_2.png) [@jetatomic](https://meta.discourse.org/u/jetatomic)
#### Post date: [July 25, 2017, 12:19am UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/7 "2017-07-25T00:19:20Z")

</div>

Ha! No, i didn’t see the notice about it moving. Of course it’s where I looked originally. The location in Network makes sense. Thank you.

---

<div class="post-metadata">

### Author: ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)
#### Post date: [August 3, 2017, 3:54pm UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/8 "2017-08-03T15:54:34Z")

</div>

![39](https://global.discourse-cdn.com/meta/original/3X/5/e/5e6c76fd24ffce841c540aea94a6e8ce80e227b9.png)  
Any plans to also implement this the other way around?  
I’d really want to use Discourse as SSO provider, while also keeping the userdata in sync

Specific usecases:

- changing name in discourse should change name in wordpress
- deleting a user in discourse should remove the user from wordpress (or disable the account)

We use usermanagement to restrict access to the site and forum, so deleting/anonymising a forum-user should really result in them losing access to the site as well.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [August 3, 2017, 5:28pm UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/9 "2017-08-03T17:28:20Z")

</div>

> [@Bas](#):
>
> changing name in discourse should change name in wordpress

The WordPress username isn’t editable, but changing the Discourse username does update the Discourse Name on WordPress when Discourse is used as the SSO provider. I should make that clear in the documentation.

> [@Bas](#):
>
> deleting a user in discourse should remove the user from wordpress (or disable the account)

The Discourse user webhook isn’t sent when an account is deleted, so this isn’t going to work. If Discourse plugin was created that would send a request to WordPress when an account was deleted, then it would be easy to delete the user on the WordPress end.

I’ll see if I can think of a way of handling the whole process from the WordPress end.

---

<div class="post-metadata">

### Author: ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)
#### Post date: [August 4, 2017, 8:42am UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/10 "2017-08-04T08:42:32Z")

</div>

Thanks for reaching out! At the moment it doesn’t seem to change the Discourse name.

That said, my setup at the moment is a bit flaky (running on IP addresses only); I should have a more solid system in place this afternoon and I’ll let you know 🙂

---

<div class="post-metadata">

### Author: ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)
#### Post date: [August 10, 2017, 1:26pm UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/11 "2017-08-10T13:26:39Z")

</div>

Hi @simon,

I can confirm that the discourse username and the “first name” change in WP if you change them in Discourse, but only after a logout/in.

Keep up the good work 🙂

Thanks,  
Bas

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [October 13, 2017, 11:15pm UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/12 "2017-10-13T23:15:49Z")

</div>

[WP Discourse](https://github.com/discourse/wp-discourse) version 1.4.5 is now in the WordPress repo. It has a few small changes:

When posts are updated on WordPress, they are no longer automatically republished to Discourse. To republish the post, select the Update Discourse topic checkbox in the Publish to Discourse meta-box.

An option to open the Start Discussion and Continue Discussion links in a new tab has been added. You can find it on the plugin’s Commenting settings tab.

A `wpds_sync_discourse_comments` action has been added. Calling  
`do_action( 'wpdc_sync_discourse_comments', $post_id )`  
will call the [WP Discourse](https://github.com/discourse/wp-discourse) `sync_comments` function for `$post_id`. It was added to make it possible to use the plugin with the Timber theme, but could have other uses. See [WP Discourse plugin tips and tricks](https://meta.discourse.org/t/wp-discourse-plugin-tips-and-tricks/50757#timber-theme) for details.

Let me know if there are any problems associated with these changes. You can find older versions of the plugin here: [WP Discourse (advanced view) – WordPress plugin | WordPress.org](https://wordpress.org/plugins/wp-discourse/advanced/)

---

<div class="post-metadata">

### Author: ![philh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/philh/32/532740_2.png) [@philh](https://meta.discourse.org/u/philh)
#### Post date: [November 1, 2017, 5:39pm UTC](https://meta.discourse.org/t/wp-discourse-1-4-0-release/65283/13 "2017-11-01T17:39:55Z")

</div>

Thanks for the great work on this @simon

Do you have any plans or interest in adding support for Discourse tags in the WP publish interface?
