Making WordPress.org


Ignore:
Timestamp:
06/03/2021 06:36:20 AM (4 years ago)
Author:
dd32
Message:

Main theme: Stats page: Allow changing the displayed pie chart into a table.

Fixes #4891.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php

    r11002 r11007  
    8888        get_theme_file_uri( '/css/style.css' ),
    8989        array( 'dashicons', 'open-sans' ),
    90         100
     90        filemtime( __DIR__ . '/css/style.css' )
    9191    );
    9292
     
    101101    if ( is_page( 'stats' ) ) {
    102102        wp_enqueue_script( 'google-charts', 'https://www.gstatic.com/charts/loader.js', [], null, true );
    103         wp_enqueue_script( 'wporg-page-stats', get_theme_file_uri( '/js/page-stats.js' ), [ 'jquery', 'google-charts' ], 3, true );
     103        wp_enqueue_script( 'wporg-page-stats', get_theme_file_uri( '/js/page-stats.js' ), [ 'jquery', 'google-charts' ], filemtime( __DIR__ . '/js/page-stats.js' ), true );
    104104        wp_localize_script( 'wporg-page-stats', 'wporgPageStats', [
    105             'trunk'         => number_format( WP_CORE_STABLE_BRANCH + 0.1, 1 ), /* trunk */
     105            'trunk'       => number_format( WP_CORE_STABLE_BRANCH + 0.1, 1 ), /* trunk */
     106            'viewAsChart' => __( 'View as Chart', 'wporg' ),
     107            'viewAsTable' => __( 'View as Table', 'wporg' ),
    106108        ] );
    107109    } elseif ( is_page( 'download' ) ) {
Note: See TracChangeset for help on using the changeset viewer.