Changeset 9195
- Timestamp:
- 10/17/2019 05:16:38 AM (6 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content
- Files:
-
- 1 added
- 5 edited
-
mu-plugins/pub/wporg-google-tag-manager.php (added)
-
themes/pub/gutenberg/front-page.php (modified) (1 diff)
-
themes/pub/gutenberg/functions.php (modified) (1 diff)
-
themes/pub/wporg-login/functions.php (modified) (1 diff)
-
themes/pub/wporg-login/header.php (modified) (1 diff)
-
themes/pub/wporg-main/page-download-counter.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/front-page.php
r9183 r9195 9 9 10 10 <body <?php body_class( 'folded' ); ?>> 11 < noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P24PF4B" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>11 <?php wp_body_open(); ?> 12 12 <div class="gutenberg"> 13 13 <div id="editor" class="gutenberg__editor"></div> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php
r9183 r9195 1029 1029 1030 1030 add_filter( 'handbook_display_toc', '__return_false' ); 1031 1032 /**1033 * Output the GoogleTagManager <head> tags.1034 */1035 function wporg_gutenberg_gtm() {1036 ?>1037 1038 <link rel="dns-prefetch" href="//www.googletagmanager.com">1039 1040 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':1041 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],1042 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=1043 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);1044 })(window,document,'script','dataLayer','GTM-P24PF4B');</script>1045 1046 <?php1047 }1048 add_action( 'wp_head', 'wporg_gutenberg_gtm' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php
r9169 r9195 133 133 134 134 /** 135 * Output the GoogleTagManager <head> tags.136 */137 function wporg_login_gtm() {138 ?>139 <link rel="dns-prefetch" href="//www.googletagmanager.com">140 141 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':142 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],143 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=144 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);145 })(window,document,'script','dataLayer','GTM-P24PF4B');</script>146 <?php147 }148 add_action( 'wp_head', 'wporg_login_gtm' );149 add_action( 'login_head', 'wporg_login_gtm' );150 151 /**152 135 * wp_die() handler for login.wordpress.org, adds GTM to error pages. 153 136 */ 154 137 function wporg_login_die_handler( $message, $title = '', $args = array() ) { 155 if ( is_string( $message ) ) {138 if ( is_string( $message ) && is_callable( '\WordPressdotorg\Plugin\GoogleTagManager\wp_head' ) ) { 156 139 ob_start(); 157 wporg_login_gtm(); 140 141 \WordPressdotorg\Plugin\GoogleTagManager\wp_head(); 142 \WordPressdotorg\Plugin\GoogleTagManager\wp_body_open(); 143 158 144 $gtm = ob_get_clean(); 159 145 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/header.php
r9155 r9195 17 17 <body <?php body_class( 'wp-core-ui login no-js' ); ?>> 18 18 <script type="text/javascript">document.body.className = document.body.className.replace('no-js','js');</script> 19 < noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P24PF4B" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>19 <?php wp_body_open(); ?> 20 20 21 21 <div id="login"> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-download-counter.php
r8277 r9195 66 66 number_format_i18n( $num ) 67 67 ); 68 69 // Remove some headers we don't need: 70 remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); 71 remove_action( 'wp_head', 'wp_print_styles', 8 ); 72 remove_action( 'wp_head', 'wp_print_head_scripts', 9 ); 73 remove_action( 'wp_head', '_admin_bar_bump_cb' ); 68 74 69 75 ?> … … 76 82 <meta name="viewport" content="width=device-width,initial-scale=1.0"> 77 83 <link rel="canonical" href="<?php echo esc_url( $canonical_url ); ?>"> 78 <link rel="dns-prefetch" href="//www.googletagmanager.com">79 84 <meta name="description" content="<?php echo esc_attr( $meta_desc_text ); ?>"> 80 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':81 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],82 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=83 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);84 })(window,document,'script','dataLayer','GTM-P24PF4B');</script>85 85 <style type="text/css"> 86 86 html, … … 215 215 } 216 216 </style> 217 <?php wp_head(); ?> 217 218 </head> 218 219 219 220 <body> 220 < noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P24PF4B" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>221 <?php wp_body_open(); ?> 221 222 <div class="something-semantic"> 222 223 <div class="something-else-semantic">
Note: See TracChangeset
for help on using the changeset viewer.