PluginProbe
ActivityPub / 8.0.2
ActivityPub v8.0.2
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/scheduler/class-comment.php +4 -4 9.3.0 → 8.0.2 View file →
@@ -39,13 +39,13 @@
39 39 * @param string $old_status Old comment status.
40 40 * @param \WP_Comment $comment Comment object.
41 41 */
42 42 public static function schedule_comment_activity( $new_status, $old_status, $comment ) {
43 - if ( \defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
43 + if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
44 44 return;
45 45 }
46 46
47 - $comment = \get_comment( $comment );
47 + $comment = get_comment( $comment );
48 48
49 49 // Federate only comments that are written by a registered user.
50 50 if ( ! $comment || ! $comment->user_id ) {
51 51 return;
@@ -64,9 +64,9 @@
64 64 $allowed_types = Comment_Utils::get_comment_type_slugs();
65 65 $allowed_types[] = 'comment'; // Add core WordPress comment types.
66 66
67 67 // Check if comment type is in allowed list.
68 - if ( ! \in_array( $comment_type, $allowed_types, true ) ) {
68 + if ( ! in_array( $comment_type, $allowed_types, true ) ) {
69 69 return;
70 70 }
71 71
72 72 $type = false;
@@ -77,9 +77,9 @@
77 77 ) {
78 78 $type = 'Create';
79 79 } elseif ( 'approved' === $new_status ) {
80 80 $type = 'Update';
81 - \update_comment_meta( $comment->comment_ID, 'activitypub_comment_modified', \time(), true );
81 + \update_comment_meta( $comment->comment_ID, 'activitypub_comment_modified', time(), true );
82 82 } elseif (
83 83 'trash' === $new_status ||
84 84 ( 'delete' === $new_status && '' === $old_status ) || // Went through schedule_comment_delete_activity().
85 85 'spam' === $new_status