Changeset 45928 for trunk/src/wp-includes/general-template.php
- Timestamp:
- 09/02/2019 02:26:55 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r45926 r45928 2987 2987 * 2988 2988 * Outputs a noindex meta tag that tells web robots not to index the page content. 2989 * Typical usage is as a wp_headcallback. add_action( 'wp_head', 'wp_no_robots' );2989 * Typical usage is as a {@see 'wp_head'} callback. add_action( 'wp_head', 'wp_no_robots' ); 2990 2990 * 2991 2991 * @since 3.3.0 2992 * @since 5.3.0 Echo "noindex,nofollow" if search engine visibility is discouraged. 2992 2993 */ 2993 2994 function wp_no_robots() { 2994 echo "<meta name='robots' content='noindex,follow' />\n"; 2995 if ( get_option( 'blog_public' ) ) { 2996 echo "<meta name='robots' content='noindex,follow' />\n"; 2997 return; 2998 } 2999 3000 echo "<meta name='robots' content='noindex,nofollow' />\n"; 2995 3001 } 2996 3002
Note: See TracChangeset
for help on using the changeset viewer.