Changeset 8114
- Timestamp:
- 01/20/2019 11:02:50 PM (6 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r7955 r8114 134 134 */ 135 135 public static function output_meta() { 136 $metas = []; 137 138 if ( is_singular( 'plugin' ) ) { 136 $metas = []; 137 $noindex = false; 138 139 // Prevent duplicate search engine results. 140 if ( get_query_var( 'plugin_advanced' ) || is_search() ) { 141 $noindex = true; 142 } elseif ( is_singular( 'plugin' ) ) { 139 143 $metas[] = sprintf( 140 144 '<meta name="description" value="%s" />', … … 142 146 ); 143 147 144 // Add noindex on disabled plugin page.148 // Add noindex for closed plugins. 145 149 if ( 'publish' !== get_post_status() ) { 146 $metas[] = '<meta name="robots" content="noindex" />'; 147 } 150 $noindex = true; 151 } 152 } 153 154 if ( $noindex ) { 155 $metas[] = '<meta name="robots" content="noindex,follow" />' . "\n"; 148 156 } 149 157 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
r8108 r8114 303 303 } 304 304 305 // Prevent duplicate search engine results.306 if ( get_query_var( 'plugin_advanced' ) || is_search() ) {307 echo '<meta name="robots" content="noindex, follow" />' . "\n";308 }309 310 305 if ( ! is_singular( 'plugin' ) ) { 311 306 return;
Note: See TracChangeset
for help on using the changeset viewer.