Making WordPress.org


Ignore:
Timestamp:
03/22/2020 02:38:42 PM (5 years ago)
Author:
ocean90
Message:

Translate: Add sorting indicators to stats tables.

Fixes #4191.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/stats-overview.php

    r8348 r9618  
    1515            <tr>
    1616                <th class="col-locale-code"><?php _e( 'Locale' ); ?></th>
    17                 <?php foreach ( $projects as $slug => $project ) : ?>
    18                     <th><?php
    19                         $namereplace = array( 'WordPress.org ', 'WordPress for ', 'WordPress ', 'ectory', ' - Development' );
    20                         echo esc_html( str_replace( $namereplace, '', $project->name ) );
    21                     ?></th>
     17                <?php foreach ( $projects as $slug => $project ) :
     18                    $name = str_replace( array( 'WordPress.org ', 'WordPress for ', 'WordPress ', 'ectory', ' - Development' ), '', $project->name );
     19                    ?>
     20                    <th class="col-<?php echo esc_attr( sanitize_title( $name ) ); ?>"><?php echo esc_html( $name ); ?></th>
    2221                <?php endforeach; ?>
    2322            </tr>
     
    7675jQuery( document ).ready( function( $ ) {
    7776    $( '#stats-table' ).tablesorter( {
     77        theme: 'wporg-translate',
    7878        textExtraction: function( node ) {
    7979            var cellValue = $( node ).text(),
Note: See TracChangeset for help on using the changeset viewer.