- Timestamp:
- 12/15/2017 12:13:33 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/functions.php
r6248 r6277 32 32 add_theme_support( 'automatic-feed-links' ); 33 33 34 // Don't include Adjacent Posts functionality 34 // Don't include Adjacent Posts functionality. 35 35 remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' ); 36 36 … … 81 81 function scripts() { 82 82 $suffix = is_rtl() ? '-rtl' : ''; 83 wp_enqueue_style( 'wporg-style', get_stylesheet_directory_uri() . "/css/style{$suffix}.css", ['dashicons', 'open-sans'], '20171207' ); 84 85 //wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true ); 83 wp_enqueue_style( 'wporg-style', get_stylesheet_directory_uri() . "/css/style{$suffix}.css", [ 'dashicons', 'open-sans' ], '20171207' ); 84 85 // phpcs:ignore Squiz.PHP.CommentedOutCode.Found, Squiz.Commenting.InlineComment.InvalidEndChar 86 // wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true ); 86 87 wp_enqueue_script( 'wporg-plugins-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); 87 88 … … 123 124 124 125 // Remove version argument. 125 if ( in_array( $handle, [ 'open-sans'], true ) ) {126 if ( in_array( $handle, [ 'open-sans' ], true ) ) { 126 127 $src = remove_query_arg( 'ver', $src ); 127 128 } … … 137 138 */ 138 139 function customize_register( $wp_customize ) { 139 $wp_customize->get_setting( 'blogname' )->transport 140 $wp_customize->get_setting( 'blogdescription' )->transport 140 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 141 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 141 142 } 142 143 add_action( 'customize_register', __NAMESPACE__ . '\customize_register' ); … … 148 149 wp_enqueue_script( 'wporg_plugins_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true ); 149 150 } 150 add_action( 'customize_preview_init', 151 add_action( 'customize_preview_init', __NAMESPACE__ . '\customize_preview_js' ); 151 152 152 153 … … 160 161 wp_cache_add_global_groups( array( 'locale-associations' ) ); 161 162 162 if ( false === ( $sites = wp_cache_get( 'local-sites', 'locale-associations' ) ) ) { 163 $sites = wp_cache_get( 'local-sites', 'locale-associations' ); 164 165 if ( false === $sites ) { 163 166 global $wpdb; 164 167 168 // phpcs:ignore WordPress.VIP.DirectDatabaseQuery.DirectQuery 165 169 $sites = $wpdb->get_results( 'SELECT locale, subdomain FROM locales', OBJECT_K ); 166 170 if ( ! $sites ) { … … 188 192 'locale' => 'en_US', 189 193 'hreflang' => 'en', 190 'subdomain' => '' 194 'subdomain' => '', 191 195 ); 192 196 … … 202 206 'https://%swordpress.org%s', 203 207 $site->subdomain ? "{$site->subdomain}." : '', 204 $_SERVER[ 'REQUEST_URI' ]208 $_SERVER['REQUEST_URI'] // phpcs:ignore 205 209 ); 206 210
Note: See TracChangeset
for help on using the changeset viewer.