Making WordPress.org


Ignore:
Timestamp:
06/08/2026 10:45:07 AM (4 months ago)
Author:
thilinah
Message:

Plugin Directory: server-render screenshots gallery + Gallery Lightbox Enhancements polyfill

Props alexodiy, thilinah, dd32, bor0.
Closes ​https://github.com/WordPress/wordpress.org/pull/622.
Fixes #2273, #8083, #8204, #5190, #7878.

File:
1 edited

Legend:

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

    r14941 r14950  
    140140        }
    141141
    142         // React is currently only used on detail pages.
    143         if ( is_single() ) {
    144                 $assets_path = __DIR__ . '/build/theme.asset.php';
    145                 if ( file_exists( $assets_path ) ) {
    146                         $script_info = require( $assets_path );
    147                         wp_enqueue_script(
    148                                 'wporg-plugins-client',
    149                                 get_stylesheet_directory_uri() . '/build/theme.js',
    150                                 $script_info['dependencies'],
    151                                 $script_info['version'],
    152                                 true
    153                         );
    154                         wp_localize_script(
    155                                 'wporg-plugins-client',
    156                                 'localeData',
    157                                 array(
    158                                         '' => array(
    159                                                 'Plural-Forms' => _x( 'nplurals=2; plural=n != 1;', 'plural forms', 'wporg-plugins' ),
    160                                                 'Language'     => _x( 'en', 'language (fr, fr_CA)', 'wporg-plugins' ),
    161                                                 'localeSlug'   => _x( 'en', 'locale slug', 'wporg-plugins' ),
    162                                         ),
    163                                         'screenshots' => __( 'Screenshots', 'wporg-plugins' ),
    164                                 )
    165                         );
    166                 }
    167         }
    168 
    169142        // No Jetpack scripts needed.
    170143        add_filter( 'jetpack_implode_frontend_css', '__return_false' );
    … …  
    197170                'wporg-plugins-locale-banner',
    198171                'wporg-plugins-stats',
    199                 'wporg-plugins-client',
    200172                'wporg-plugins-faq',
    201173        ];
Note: See TracChangeset for help on using the changeset viewer.