From b469c23220ebf8e1adadd6cd970b45a1a4406f1f Mon Sep 17 00:00:00 2001 From: Matt Wiebe Date: Wed, 25 Sep 2024 14:29:55 -0500 Subject: [PATCH] wpcom wants anonymous functions like this (#901) --- includes/collection/class-extra-fields.php | 4 ++-- integration/load.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/collection/class-extra-fields.php b/includes/collection/class-extra-fields.php index c2fc9c9ca..608cfbdab 100644 --- a/includes/collection/class-extra-fields.php +++ b/includes/collection/class-extra-fields.php @@ -67,7 +67,7 @@ public static function fields_to_attachments( $fields ) { $attachments = array(); \add_filter( 'activitypub_link_rel', - function( $rel ) { + function ( $rel ) { $rel .= ' me'; return $rel; @@ -187,7 +187,7 @@ public static function default_actor_extra_fields( $extra_fields, $user_id ) { \add_filter( 'activitypub_link_rel', - function( $rel ) { + function ( $rel ) { $rel .= ' me'; return $rel; diff --git a/integration/load.php b/integration/load.php index 509a36e53..ed254bc30 100644 --- a/integration/load.php +++ b/integration/load.php @@ -75,7 +75,7 @@ function plugin_init() { add_filter( 'activitypub_transformer', // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.objectFound - function( $transformer, $object, $object_class ) { + function ( $transformer, $object, $object_class ) { if ( 'WP_Post' === $object_class && \get_post_meta( $object->ID, 'audio_file', true ) @@ -126,7 +126,7 @@ function register_stream_connector( $classes ) { // Excluded ActivityPub post types from the Stream. add_filter( 'wp_stream_posts_exclude_post_types', - function( $post_types ) { + function ( $post_types ) { $post_types[] = 'ap_follower'; $post_types[] = 'ap_extrafield'; $post_types[] = 'ap_extrafield_blog';