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
This commit is contained in:
Ryan Boren 2013-08-16 15:46:08 +00:00
parent 123b419481
commit 5125650b72
2 changed files with 3 additions and 2 deletions

View File

@ -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'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=delete-selected&amp;checked[]=' . $theme_key . '&amp;theme_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-themes' ) ) . '" title="' . esc_attr__( 'Delete this theme' ) . '" class="delete">' . __( 'Delete' ) . '</a>';
$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') );

View File

@ -149,6 +149,7 @@ class WP_Themes_List_Table extends WP_List_Table {
. "' );" . '">' . __( 'Delete' ) . '</a>';
$actions = apply_filters( 'theme_action_links', $actions, $theme );
$actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme );
$delete_action = isset( $actions['delete'] ) ? '<div class="delete-theme">' . $actions['delete'] . '</div>' : '';
unset( $actions['delete'] );