PluginProbe
ActivityPub / 2.6.0
ActivityPub v2.6.0
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
← All changes | includes/handler/class-create.php +5 -1 2.0.12.6.0 View file →
@@ -32,8 +32,12 @@
32 32 *
33 33 * @return void
34 34 */
35 35 public static function handle_create( $array, $user_id, $object = null ) {
36 + if ( ACTIVITYPUB_DISABLE_INCOMING_INTERACTIONS ) {
37 + return;
38 + }
39 +
36 40 if (
37 41 ! isset( $array['object'] ) ||
38 42 ! isset( $array['object']['id'] )
39 43 ) {
@@ -56,9 +60,9 @@
56 60
57 61 $state = Interactions::add_comment( $array );
58 62 $reaction = null;
59 63
60 - if ( $state && ! \is_wp_error( $reaction ) ) {
64 + if ( $state && ! \is_wp_error( $state ) ) {
61 65 $reaction = \get_comment( $state );
62 66 }
63 67
64 68 \do_action( 'activitypub_handled_create', $array, $user_id, $state, $reaction );