Changeset 7439
- Timestamp:
- 07/12/2018 05:49:22 PM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
r7437 r7439 63 63 wp_style_add_data( 'wporg-style', 'rtl', 'replace' ); 64 64 65 // Make jQuery a footer script. 66 wp_scripts()->add_data( 'jquery', 'group', 1 ); 67 wp_scripts()->add_data( 'jquery-core', 'group', 1 ); 68 wp_scripts()->add_data( 'jquery-migrate', 'group', 1 ); 69 65 70 wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true ); 66 71 wp_enqueue_script( 'wporg-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); 67 72 68 73 if ( is_singular( 'plugin' ) ) { 69 wp_enqueue_script( 'wporg-plugins-popover', get_stylesheet_directory_uri() . '/js/popover.js', array( ), '20171002', true );74 wp_enqueue_script( 'wporg-plugins-popover', get_stylesheet_directory_uri() . '/js/popover.js', array( 'jquery' ), '20171002', true ); 70 75 wp_enqueue_script( 'wporg-plugins-faq', get_stylesheet_directory_uri() . '/js/section-faq.js', array( 'jquery' ), '20180131', true ); 71 76 } 72 77 73 78 if ( ! is_404() ) { 74 wp_enqueue_script( 'wporg-plugins-locale-banner', get_stylesheet_directory_uri() . '/js/locale-banner.js', array( ), '20171116', true );79 wp_enqueue_script( 'wporg-plugins-locale-banner', get_stylesheet_directory_uri() . '/js/locale-banner.js', array( 'jquery' ), '20171116', true ); 75 80 wp_localize_script( 'wporg-plugins-locale-banner', 'wporgLocaleBanner', array( 76 81 'apiURL' => rest_url( '/plugins/v1/locale-banner' ), … … 120 125 add_filter( 'jetpack_implode_frontend_css', '__return_false' ); 121 126 wp_dequeue_script( 'devicepx' ); 127 wp_register_script( 'grofiles-cards', false ); 128 wp_enqueue_script( 'grofiles-cards' ); 122 129 } 123 130 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\scripts' ); … … 134 141 'dashicons', 135 142 'wp-embed', 143 'jquery-core', 144 'jquery-migrate', 136 145 'wporg-style', 137 146 'wporg-navigation', … … 144 153 ]; 145 154 146 if ( false === strpos( home_url(), 'wordpress.org' )) {155 if ( defined( 'WPORG_SANDBOXED' ) && WPORG_SANDBOXED ) { 147 156 return $src; 148 157 } -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/inc/template-tags.php
r6541 r7439 85 85 </span> 86 86 </a> 87 <script> 88 jQuery( '.plugin-favorite-heart' ) 87 </div> 88 <?php 89 wp_add_inline_script( 90 'wporg-plugins-faq', 91 "jQuery( '.plugin-favorite-heart' ) 89 92 .on( 'click touchstart animationend', function () { 90 93 jQuery( this ).toggleClass( 'is-animating' ); … … 92 95 .on( 'click', function () { 93 96 jQuery( this ).toggleClass( 'favorited' ); 94 } ); 95 </script> 96 </div> 97 <?php 97 } );" 98 ); 98 99 } 99 100
Note: See TracChangeset
for help on using the changeset viewer.