diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php index a6ddfdaa8d..47c2fc90b9 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -250,79 +250,102 @@ class WP_MS_Themes_List_Table extends WP_List_Table { } function display_rows() { + foreach ( $this->items as $key => $theme ) + $this->single_row( $key, $theme ); + } + + function single_row( $key, $theme ) { global $status, $page, $s; $context = $status; - + if ( $this->is_site_themes ) $url = "site-themes.php?id={$this->site_id}&"; else $url = 'themes.php?'; - foreach ( $this->items as $key => $theme ) { - // preorder - $actions = array( - 'enable' => '', - 'disable' => '', - 'edit' => '' - ); - - $theme_key = esc_html( $theme['Stylesheet'] ); + // preorder + $actions = array( + 'enable' => '', + 'disable' => '', + 'edit' => '' + ); - if ( empty( $theme['enabled'] ) ) - $actions['enable'] = '' . __('Enable') . ''; - else - $actions['disable'] = '' . __('Disable') . ''; - - if ( current_user_can('edit_themes') ) - $actions['edit'] = '' . __('Edit') . ''; + $theme_key = esc_html( $theme['Stylesheet'] ); - $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme_key, $theme, $context ); - $actions = apply_filters( "theme_action_links_$theme_key", $actions, $theme_key, $theme, $context ); + if ( empty( $theme['enabled'] ) ) + $actions['enable'] = '' . __('Enable') . ''; + else + $actions['disable'] = '' . __('Disable') . ''; - $class = empty( $theme['enabled'] ) ? 'inactive' : 'active'; - $checkbox = ""; + if ( current_user_can('edit_themes') ) + $actions['edit'] = '' . __('Edit') . ''; - $description = '
' . $theme['Description'] . '
'; - $theme_name = $theme['Name']; + $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme_key, $theme, $context ); + $actions = apply_filters( "theme_action_links_$theme_key", $actions, $theme_key, $theme, $context ); + $class = empty( $theme['enabled'] ) ? 'inactive' : 'active'; + $checkbox_id = md5($theme['Name']) . "_checkbox"; + $checkbox = ""; - $id = sanitize_title( $theme_name ); + $description = '' . $theme['Description'] . '
'; + $theme_name = $theme['Name']; - echo " -