PluginProbe
Friends / 4.3.2
Friends v4.3.2
4.3.2 4.3.1 4.3.0 4.2.2 4.2.1 4.2.0 4.1.0 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.0 2.9.1 All 88 releases
← All changes | includes/class-user.php +8 -3 4.2.14.3.2 View file →
@@ -929,9 +929,9 @@
929 929 $remote_post_ids = array();
930 930 $existing_posts = new \WP_Query();
931 931 foreach ( array(
932 932 'post_type' => Friends::CPT,
933 - 'post_status' => array( 'publish', 'private', 'trash' ),
933 + 'post_status' => array( 'publish', 'private', 'trash', 'future' ),
934 934 'nopaging' => true,
935 935 'fields' => 'ids',
936 936 ) as $key => $value ) {
937 937 $existing_posts->set( $key, $value );
@@ -1250,9 +1250,13 @@
1250 1250 public static function mastodon_api_account_id( $user_id, $post_id ) {
1251 1251 if ( $user_id ) {
1252 1252 return $user_id;
1253 1253 }
1254 - $user = Feed_Parser_ActivityPub::determine_mastodon_api_user( $user_id );
1254 + $user = false;
1255 + // The ActivityPub parser is only loaded when the ActivityPub plugin is active.
1256 + if ( class_exists( Feed_Parser_ActivityPub::class ) ) {
1257 + $user = Feed_Parser_ActivityPub::determine_mastodon_api_user( $user_id );
1258 + }
1255 1259 if ( ! $user ) {
1256 1260 $user = self::get_post_author( get_post( $post_id ) );
1257 1261 }
1258 1262 if ( $user instanceof self ) {
@@ -1293,9 +1297,10 @@
1293 1297 if ( ! $relationship instanceof \Enable_Mastodon_Apps\Entity\Relationship ) {
1294 1298 $relationship = new \Enable_Mastodon_Apps\Entity\Relationship();
1295 1299 }
1296 1300 foreach ( $user->get_active_feeds() as $feed ) {
1297 - if ( Feed_Parser_ActivityPub::SLUG === $feed->get_parser() ) {
1301 + // Not Feed_Parser_ActivityPub::SLUG: this is reached above without the ActivityPub plugin, so that class may not exist.
1302 + if ( 'activitypub' === $feed->get_parser() ) {
1298 1303 $relationship->following = true;
1299 1304 break;
1300 1305 }
1301 1306 }