2
0
Fork 0
mirror of https://github.com/discourse/wp-discourse.git synced 2025-10-03 08:59:21 +08:00

Two Five Nine (#549)

* Move from add_post_meta to update_post_meta

Potentially more stable for Wordpress instances with customisations affecting the use of custom fields.

* Bump versions
This commit is contained in:
Angus McLeod 2025-06-12 17:59:28 +01:00 committed by GitHub
parent 87a14f9327
commit b87610d6d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 4 deletions

View file

@ -932,7 +932,7 @@ class DiscoursePublish extends DiscourseBase {
*/
protected function dc_add_post_meta( $post_id, $key, $value, $unique = false ) {
if ( empty( $this->options['direct-db-publication-flags'] ) ) {
return add_post_meta( $post_id, $key, $value, $unique );
return update_post_meta( $post_id, $key, $value );
}

global $wpdb;

View file

@ -2,9 +2,9 @@
Contributors: scossar, cdck, angusmcleod, samsaffron, techapj
Tags: discourse, forum, comments, sso
Requires at least: 5.1
Tested up to: 6.7.2
Tested up to: 6.8.1
Requires PHP: 5.6
Stable tag: 2.5.8
Stable tag: 2.5.9
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

@ -123,6 +123,11 @@ To create a coherent top menu, see our tutorial on how to make a [Custom nav hea

== Changelog ==

#### 2.5.9 10/06/2025

- Updated publish post meta fields storage approach.
- Wordpress 6.8.1 support.

#### 2.5.8 23/05/2025

- Sidebar and comment block JS upgrades.

View file

@ -2,7 +2,7 @@
/**
* Plugin Name: WP-Discourse
* Description: Use Discourse as a community engine for your WordPress blog
* Version: 2.5.8
* Version: 2.5.9
* Requires at least: 5.1
* Requires PHP: 5.6
* Author: Discourse