Changeset 8114 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
- Timestamp:
- 01/20/2019 11:02:50 PM (7 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.