diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index a2b7d54..29e6e4c 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -122,13 +122,4 @@ - - - /admin/comment-parent\.php$ - /inc/clean-emails\.php$ - /inc/email-links\.php$ - - diff --git a/inc/email-links.php b/inc/email-links.php index 88036bc..8bcdcbe 100644 --- a/inc/email-links.php +++ b/inc/email-links.php @@ -47,16 +47,18 @@ public function admin_bar_comment_link(): void { $current_user = \wp_get_current_user(); - $comments = get_comments( [ - 'post_id' => $post->ID, - 'type' => 'comment', - 'status' => 'approve', - ] ); + $comments = get_comments( + [ + 'post_id' => $post->ID, + 'type' => 'comment', + 'status' => 'approve', + ] + ); if ( count( $comments ) === 0 ) { return; } $emails = []; - foreach( $comments as $comment ) { + foreach ( $comments as $comment ) { $emails[] = $comment->comment_author_email; } $emails = array_unique( $emails ); @@ -162,7 +164,8 @@ private function replace_variables( $msg, $comment = false, $post = false ): str if ( \is_numeric( $post ) ) { $post = \get_post( $post ); - } elseif ( \is_object( $comment ) && $comment->comment_post_ID > 0 ) { + } + elseif ( \is_object( $comment ) && $comment->comment_post_ID > 0 ) { $post = \get_post( $comment->comment_post_ID ); }