updated plugin Event Bridge for ActivityPub version 1.3.0

This commit is contained in:
2026-06-03 21:28:57 +00:00
committed by Gitium
parent 1f3438440f
commit f2d6714572
84 changed files with 1721 additions and 1361 deletions

View File

@ -8,7 +8,7 @@
namespace Event_Bridge_For_ActivityPub\Admin;
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
\defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
use Activitypub\Transformer\Factory as Transformer_Factory;
use Event_Bridge_For_ActivityPub\Integrations\Event_Plugin_Integration;
@ -90,10 +90,6 @@ class Health_Check {
* @return bool True if the check passed.
*/
public static function test_if_event_transformer_is_used( $event_plugin ): bool {
if ( ! Setup::get_instance()->is_activitypub_plugin_active() ) {
return false;
}
// Get a (random) event post.
$event_posts = self::get_most_recent_event_posts( $event_plugin->get_post_type(), 1 );
@ -121,10 +117,6 @@ class Health_Check {
* @return \WP_Post[] Array of event posts, or false if none are found.
*/
public static function get_most_recent_event_posts( $event_post_type = null, $number_of_posts = 5 ): array {
if ( ! Setup::get_instance()->is_activitypub_plugin_active() ) {
return array();
}
if ( ! $event_post_type ) {
$active_event_plugins = Setup::get_instance()->get_active_event_plugins();
$active_event_plugin = reset( $active_event_plugins );
@ -141,6 +133,7 @@ class Health_Check {
'order' => 'DESC',
'include' => array(),
'exclude' => array(),
// phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
'meta_query' => array(
'relation' => 'OR',
array(