WordPress.org

Make WordPress Core

Ticket #24478: 24478.diff

File 24478.diff, 1.9 KB (added by georgestephanis, 19 months ago)

Potentially breaking ms-themes table by dropping the $stylesheet argument as per nacin.

  • wp-admin/includes/class-wp-ms-themes-list-table.php

     
    284284                if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) 
    285285                        $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>'; 
    286286 
    287                 $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $stylesheet, $theme, $context ); 
    288                 $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $stylesheet, $theme, $context ); 
     287                $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context ); 
     288                $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context ); 
    289289 
    290290                $class = ! $allowed ? 'inactive' : 'active'; 
    291291                $checkbox_id = "checkbox_" . md5( $theme->get('Name') ); 
  • wp-admin/includes/class-wp-themes-list-table.php

     
    149149                                        . "' );" . '">' . __( 'Delete' ) . '</a>'; 
    150150 
    151151                        $actions       = apply_filters( 'theme_action_links', $actions, $theme ); 
     152                        $actions       = apply_filters( "theme_action_links_$stylesheet", $actions, $theme ); 
    152153                        $delete_action = isset( $actions['delete'] ) ? '<div class="delete-theme">' . $actions['delete'] . '</div>' : ''; 
    153154                        unset( $actions['delete'] ); 
    154155