Making WordPress.org


Ignore:
Timestamp:
04/09/2020 06:54:12 AM (6 years ago)
Author:
dd32
Message:

Translate: Restore the Waiting Counts for Plugins/Themes as their own columns.

The column values are updated twice daily on a cron.

Fixes #3155.

File:
1 edited

Legend:

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

    r9618 r9711  
    1717                <?php foreach ( $projects as $slug => $project ) :
    1818                    $name = str_replace( array( 'WordPress.org ', 'WordPress for ', 'WordPress ', 'ectory', ' - Development' ), '', $project->name );
     19                    if ( $slug == 'wp-plugins' || $slug == 'wp-themes' ) {
     20                        $name = "Waiting $name";
     21                    }
    1922                    ?>
    2023                    <th class="col-<?php echo esc_attr( sanitize_title( $name ) ); ?>"><?php echo esc_html( $name ); ?></th>
     
    4750                            $percent = $translation_locale_statuses[ $locale_slug ][ $project->path ];
    4851
    49                             if ( 'waiting' === $project->path ) {
     52                            if ( 'waiting' === $project->path || 'wp-plugins' === $project->path || 'wp-themes' === $project->path ) {
     53                                $project_link_title = '';
     54                                if ( 'wp-plugins' === $project->path || 'wp-themes' === $project->path ) {
     55                                    $project_link_title = "Last Updated {$project->cache_last_updated}";
     56
     57                                    // Filter Plugins/Themes to Waiting (Most first) - Relying upon these being the last items.
     58                                    $projecturl = add_query_arg( 'filter', 'strings-waiting-and-fuzzy', $projecturl );
     59                                }
     60
    5061                                // Color code it on -0~500 waiting strings
    5162                                $percent_class = 100-min( (int) ( $percent / 50 ) * 10, 100 );
     
    5566                                }
    5667                                $percent_class = 'percent' . $percent_class;
    57                                 echo '<td data-column-title="' . esc_attr( $project_name ) . '" data-sort-value="'. esc_attr( $percent ) . '" class="' . $percent_class .'"><a href="' . esc_url( $projecturl ) . '">' . number_format( $percent ) . '</a></td>';
     68                                echo '<td data-column-title="' . esc_attr( $project_name ) . '" data-sort-value="'. esc_attr( $percent ) . '" class="' . $percent_class .'"><a href="' . esc_url( $projecturl ) . '" title="' . esc_attr( $project_link_title ) . '">' . number_format( $percent ) . '</a></td>';
    5869                            } else {
    5970                                $percent_class = 'percent' . (int) ( $percent / 10 ) * 10;
Note: See TracChangeset for help on using the changeset viewer.