Skip to content

Commit

Permalink
Merge branch 'trunk' into change/improve-conneg-extensibility
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle authored Jan 20, 2025
2 parents 9d12dd9 + d4d0ef5 commit 0f1b582
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 10 deletions.
20 changes: 14 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
<!-- Add new release below and update "Unreleased" link -->
[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
Expand Down
4 changes: 2 additions & 2 deletions activitypub.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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__ ) );
Expand Down
17 changes: 17 additions & 0 deletions includes/class-migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*
Expand Down
5 changes: 3 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 =

Expand Down

0 comments on commit 0f1b582

Please sign in to comment.