diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ba0cf813..4305c3727 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,16 +5,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] - -### Added - -* Support for WPML post locale +## [Untitled] ### Changed * Improved content negotiation and AUTHORIZED_FETCH support for third-party plugins +## [4.7.2] - 2025-01-17 + +### Fixed + +* More robust handling of `_activityPubOptions` in scripts, using a `useOptions()` helper. +* Flush post caches after Followers migration. + +### Added + +* Support for WPML post locale + ### Fixed * More robust handling of `_activityPubOptions` in scripts, using a `useOptions()` helper. @@ -1224,8 +1231,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * initial -[Unreleased]: https://github.com/Automattic/wordpress-activitypub/compare/4.7.1...trunk +[Unreleased]: https://github.com/Automattic/wordpress-activitypub/compare/4.7.2...trunk +[4.7.2]: https://github.com/Automattic/wordpress-activitypub/compare/4.7.1...4.7.2 [4.7.1]: https://github.com/Automattic/wordpress-activitypub/compare/4.7.0...4.7.1 [4.7.0]: https://github.com/Automattic/wordpress-activitypub/compare/4.6.0...4.7.0 [4.6.0]: https://github.com/Automattic/wordpress-activitypub/compare/4.5.1...4.6.0 diff --git a/activitypub.php b/activitypub.php index 22a23ec49..5960bff86 100644 --- a/activitypub.php +++ b/activitypub.php @@ -3,7 +3,7 @@ * Plugin Name: ActivityPub * Plugin URI: https://github.com/Automattic/wordpress-activitypub * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format. - * Version: 4.7.1 + * Version: 4.7.2 * Author: Matthias Pfefferle & Automattic * Author URI: https://automattic.com/ * License: MIT @@ -19,7 +19,7 @@ use WP_CLI; -\define( 'ACTIVITYPUB_PLUGIN_VERSION', '4.7.1' ); +\define( 'ACTIVITYPUB_PLUGIN_VERSION', '4.7.2' ); // Plugin related constants. \define( 'ACTIVITYPUB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); diff --git a/includes/class-migration.php b/includes/class-migration.php index cb39f31c0..3ac0489ef 100644 --- a/includes/class-migration.php +++ b/includes/class-migration.php @@ -164,6 +164,9 @@ public static function maybe_migrate() { if ( \version_compare( $version_from_db, '4.7.1', '<' ) ) { self::migrate_to_4_7_1(); } + if ( \version_compare( $version_from_db, '4.7.2', '<' ) ) { + self::migrate_to_4_7_2(); + } /** * Fires when the system has to be migrated. @@ -410,6 +413,20 @@ public static function migrate_to_4_7_1() { } } + /** + * Clears the post cache for Followers, we should have done this in 4.7.1 when we renamed those keys. + */ + public static function migrate_to_4_7_2() { + global $wpdb; + // phpcs:ignore WordPress.DB + $followers = $wpdb->get_col( + $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s", Followers::POST_TYPE ) + ); + foreach ( $followers as $id ) { + clean_post_cache( $id ); + } + } + /** * Update comment counts for posts in batches. * diff --git a/readme.txt b/readme.txt index 1a9b5d7a8..807b9191c 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: automattic, pfefferle, mattwiebe, obenland, akirk, jeherve, mediaf Tags: OStatus, fediverse, activitypub, activitystream Requires at least: 5.5 Tested up to: 6.7 -Stable tag: 4.7.1 +Stable tag: 4.7.2 Requires PHP: 7.2 License: MIT License URI: http://opensource.org/licenses/MIT @@ -132,11 +132,12 @@ For reasons of data protection, it is not possible to see the followers of other == Changelog == -= Unreleased = += 4.7.2 = * Added: Support for WPML post locale * Removed: Built-in support for nodeinfo2. Use the [NodeInfo plugin](https://wordpress.org/plugins/nodeinfo/) instead. * Fixed: More robust handling of `_activityPubOptions` in scripts, using a `useOptions()` helper. +* Fixed: Flush post caches after Followers migration. = Unreleased =