Make WordPress Core

Ticket #35335: 35335.diff

File 35335.diff, 2.7 KB (added by obenland, 11 years ago)
  • src/wp-admin/includes/class-wp-ms-themes-list-table.php

     
    682682                $stylesheet = $theme->get_stylesheet();
    683683
    684684                $class = ! $allowed ? 'inactive' : 'active';
    685 
    686                 $id = sanitize_html_class( $theme->get_stylesheet() );
    687 
    688685                if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) ) {
    689686                        $class .= ' update';
    690687                }
    691688
    692                 echo "<tr id='$id' class='$class'>";
     689                printf( '<tr class="%s" data-slug="%s">',
     690                        esc_attr( $class ),
     691                        esc_attr( $stylesheet )
     692                );
    693693
    694694                $this->single_row_columns( $theme );
    695695
  • src/wp-admin/includes/update.php

     
    456456
    457457        $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    458458
    459         echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
     459        if ( $wp_list_table->is_site_themes ) {
     460                $active = $theme->is_allowed( 'site', $wp_list_table->site_id ) ? ' active': '';
     461        } else {
     462                $active = $theme->is_allowed( 'network' ) ? ' active': '';
     463        }
     464
     465        echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr( $theme->get_stylesheet() . '-update' ) . '" data-slug="' . esc_attr( $theme->get_stylesheet() ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
    460466        if ( ! current_user_can('update_themes') ) {
    461467                /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number */
    462468                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a>.'),
    … …  
    475481                );
    476482        } else {
    477483                /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number, 5: update URL */
    478                 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a> or <a href="%5$s" aria-label="update %3$s now">update now</a>.' ),
     484                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="update %3$s now">update now</a>.' ),
    479485                        $theme['Name'],
    480486                        esc_url( $details_url ),
    481487                        esc_attr( $theme['Name'] ),