diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index 1020aab127..2facc37fa2 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -576,7 +576,9 @@ class WP_Comments_List_Table extends WP_List_Table { * @param WP_Comment $comment The comment object. * @param string $column_name Current column name. * @param string $primary Primary column name. - * @return string|void Comment row actions output. + * @return string Row actions output for comments. An empty string + * if the current column is not the primary column, + * or if the current user cannot edit the comment. */ protected function handle_row_actions( $comment, $column_name, $primary ) { global $comment_status; @@ -586,7 +588,7 @@ class WP_Comments_List_Table extends WP_List_Table { } if ( ! $this->user_can ) { - return; + return ''; } $the_comment_status = wp_get_comment_status( $comment ); diff --git a/src/wp-admin/includes/class-wp-links-list-table.php b/src/wp-admin/includes/class-wp-links-list-table.php index b0aab333e0..8cec81e540 100644 --- a/src/wp-admin/includes/class-wp-links-list-table.php +++ b/src/wp-admin/includes/class-wp-links-list-table.php @@ -314,7 +314,8 @@ class WP_Links_List_Table extends WP_List_Table { * @param object $link Link being acted upon. * @param string $column_name Current column name. * @param string $primary Primary column name. - * @return string Row action output for links. + * @return string Row actions output for links, or an empty string + * if the current column is not the primary column. */ protected function handle_row_actions( $link, $column_name, $primary ) { if ( $primary !== $column_name ) { diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php index b76c92072d..f0f3ca8a37 100644 --- a/src/wp-admin/includes/class-wp-media-list-table.php +++ b/src/wp-admin/includes/class-wp-media-list-table.php @@ -781,7 +781,8 @@ class WP_Media_List_Table extends WP_List_Table { * @param object $post Attachment being acted upon. * @param string $column_name Current column name. * @param string $primary Primary column name. - * @return string Row actions output for media attachments. + * @return string Row actions output for media attachments, or an empty string + * if the current column is not the primary column. */ protected function handle_row_actions( $post, $column_name, $primary ) { if ( $primary !== $column_name ) { @@ -789,6 +790,7 @@ class WP_Media_List_Table extends WP_List_Table { } $att_title = _draft_or_post_title(); + return $this->row_actions( $this->_get_row_actions( $post, $att_title ) ); } } diff --git a/src/wp-admin/includes/class-wp-ms-sites-list-table.php b/src/wp-admin/includes/class-wp-ms-sites-list-table.php index 34fbad2c68..35b47245cc 100644 --- a/src/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -666,11 +666,12 @@ class WP_MS_Sites_List_Table extends WP_List_Table { * @param object $blog Site being acted upon. * @param string $column_name Current column name. * @param string $primary Primary column name. - * @return string Row actions output. + * @return string Row actions output for sites in Multisite, or an empty string + * if the current column is not the primary column. */ protected function handle_row_actions( $blog, $column_name, $primary ) { if ( $primary !== $column_name ) { - return; + return ''; } $blogname = untrailingslashit( $blog['domain'] . $blog['path'] ); @@ -733,6 +734,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table { * or subdirectory multisite installation. */ $actions = apply_filters( 'manage_sites_action_links', array_filter( $actions ), $blog['blog_id'], $blogname ); + return $this->row_actions( $actions ); } } diff --git a/src/wp-admin/includes/class-wp-ms-users-list-table.php b/src/wp-admin/includes/class-wp-ms-users-list-table.php index 707b9974f9..b6e21e05f3 100644 --- a/src/wp-admin/includes/class-wp-ms-users-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-users-list-table.php @@ -488,7 +488,8 @@ class WP_MS_Users_List_Table extends WP_List_Table { * @param object $user User being acted upon. * @param string $column_name Current column name. * @param string $primary Primary column name. - * @return string Row actions output for users in Multisite. + * @return string Row actions output for users in Multisite, or an empty string + * if the current column is not the primary column. */ protected function handle_row_actions( $user, $column_name, $primary ) { if ( $primary !== $column_name ) { @@ -517,6 +518,7 @@ class WP_MS_Users_List_Table extends WP_List_Table { * @param WP_User $user WP_User object. */ $actions = apply_filters( 'ms_user_row_actions', $actions, $user ); + return $this->row_actions( $actions ); } } diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php index ee7750c12a..890d133889 100644 --- a/src/wp-admin/includes/class-wp-posts-list-table.php +++ b/src/wp-admin/includes/class-wp-posts-list-table.php @@ -1320,7 +1320,8 @@ class WP_Posts_List_Table extends WP_List_Table { * @param object $post Post being acted upon. * @param string $column_name Current column name. * @param string $primary Primary column name. - * @return string Row actions output for posts. + * @return string Row actions output for posts, or an empty string + * if the current column is not the primary column. */ protected function handle_row_actions( $post, $column_name, $primary ) { if ( $primary !== $column_name ) { diff --git a/src/wp-admin/includes/class-wp-terms-list-table.php b/src/wp-admin/includes/class-wp-terms-list-table.php index 125d3366b5..1acacfc926 100644 --- a/src/wp-admin/includes/class-wp-terms-list-table.php +++ b/src/wp-admin/includes/class-wp-terms-list-table.php @@ -446,7 +446,8 @@ class WP_Terms_List_Table extends WP_List_Table { * @param WP_Term $tag Tag being acted upon. * @param string $column_name Current column name. * @param string $primary Primary column name. - * @return string Row actions output for terms. + * @return string Row actions output for terms, or an empty string + * if the current column is not the primary column. */ protected function handle_row_actions( $tag, $column_name, $primary ) { if ( $primary !== $column_name ) {