From 5125650b7201e3d6677b5de0d2ddc018c98742c2 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 16 Aug 2013 15:46:08 +0000 Subject: [PATCH] Be consistent with the arguments passed to the theme_action_links filter. Stop passing stylesheet from class-wp-ms-themes-list-table.php. Props georgestephanis fixes #24478 git-svn-id: https://develop.svn.wordpress.org/trunk@25032 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-ms-themes-list-table.php | 4 ++-- src/wp-admin/includes/class-wp-themes-list-table.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/class-wp-ms-themes-list-table.php b/src/wp-admin/includes/class-wp-ms-themes-list-table.php index 1d61af9f82..311593d896 100644 --- a/src/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -284,8 +284,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table { if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) $actions['delete'] = '' . __( 'Delete' ) . ''; - $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $stylesheet, $theme, $context ); - $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $stylesheet, $theme, $context ); + $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context ); + $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context ); $class = ! $allowed ? 'inactive' : 'active'; $checkbox_id = "checkbox_" . md5( $theme->get('Name') ); diff --git a/src/wp-admin/includes/class-wp-themes-list-table.php b/src/wp-admin/includes/class-wp-themes-list-table.php index 684bd8be00..a9a696882d 100644 --- a/src/wp-admin/includes/class-wp-themes-list-table.php +++ b/src/wp-admin/includes/class-wp-themes-list-table.php @@ -149,6 +149,7 @@ class WP_Themes_List_Table extends WP_List_Table { . "' );" . '">' . __( 'Delete' ) . ''; $actions = apply_filters( 'theme_action_links', $actions, $theme ); + $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme ); $delete_action = isset( $actions['delete'] ) ? '
' . $actions['delete'] . '
' : ''; unset( $actions['delete'] );