404 ) ); } if ( !array_key_exists( 'id', $follower ) ) { return new \WP_Error( 'invalid_object', __( 'Object must have an "id" field', 'pterotype' ), array( 'status' => 400 ) ); } $object_id = \objects\get_object_id( $follower['id'] ); if ( !$object_id ) { $row = \objects\upsert_object( $follower ); $object_id = $row->id; } $wpdb->insert( 'pterotype_followers', array( 'actor_id' => $actor_id, 'object_id' = $object_id, ); ); } ?>