wp/wp-includes/robots-template.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
    48 
    48 
    49 	echo "<meta name='robots' content='" . esc_attr( implode( ', ', $robots_strings ) ) . "' />\n";
    49 	echo "<meta name='robots' content='" . esc_attr( implode( ', ', $robots_strings ) ) . "' />\n";
    50 }
    50 }
    51 
    51 
    52 /**
    52 /**
    53  * Adds noindex to the robots meta tag if required by the site configuration.
    53  * Adds `noindex` to the robots meta tag if required by the site configuration.
    54  *
    54  *
    55  * If a blog is marked as not being public then noindex will be output to
    55  * If a blog is marked as not being public then noindex will be output to
    56  * tell web robots not to index the page content. Add this to the
    56  * tell web robots not to index the page content. Add this to the
    57  * {@see 'wp_robots'} filter.
    57  * {@see 'wp_robots'} filter.
    58  *
    58  *
    74 
    74 
    75 	return $robots;
    75 	return $robots;
    76 }
    76 }
    77 
    77 
    78 /**
    78 /**
    79  * Adds noindex to the robots meta tag for embeds.
    79  * Adds `noindex` to the robots meta tag for embeds.
    80  *
    80  *
    81  * Typical usage is as a {@see 'wp_robots'} callback:
    81  * Typical usage is as a {@see 'wp_robots'} callback:
    82  *
    82  *
    83  *     add_filter( 'wp_robots', 'wp_robots_noindex_embeds' );
    83  *     add_filter( 'wp_robots', 'wp_robots_noindex_embeds' );
    84  *
    84  *
    96 
    96 
    97 	return $robots;
    97 	return $robots;
    98 }
    98 }
    99 
    99 
   100 /**
   100 /**
   101  * Adds noindex to the robots meta tag if a search is being performed.
   101  * Adds `noindex` to the robots meta tag if a search is being performed.
   102  *
   102  *
   103  * If a search is being performed then noindex will be output to
   103  * If a search is being performed then noindex will be output to
   104  * tell web robots not to index the page content. Add this to the
   104  * tell web robots not to index the page content. Add this to the
   105  * {@see 'wp_robots'} filter.
   105  * {@see 'wp_robots'} filter.
   106  *
   106  *
   122 
   122 
   123 	return $robots;
   123 	return $robots;
   124 }
   124 }
   125 
   125 
   126 /**
   126 /**
   127  * Adds noindex to the robots meta tag.
   127  * Adds `noindex` to the robots meta tag.
   128  *
   128  *
   129  * This directive tells web robots not to index the page content.
   129  * This directive tells web robots not to index the page content.
   130  *
   130  *
   131  * Typical usage is as a {@see 'wp_robots'} callback:
   131  * Typical usage is as a {@see 'wp_robots'} callback:
   132  *
   132  *
   148 
   148 
   149 	return $robots;
   149 	return $robots;
   150 }
   150 }
   151 
   151 
   152 /**
   152 /**
   153  * Adds noindex and noarchive to the robots meta tag.
   153  * Adds `noindex` and `noarchive` to the robots meta tag.
   154  *
   154  *
   155  * This directive tells web robots not to index or archive the page content and
   155  * This directive tells web robots not to index or archive the page content and
   156  * is recommended to be used for sensitive pages.
   156  * is recommended to be used for sensitive pages.
   157  *
   157  *
   158  * Typical usage is as a {@see 'wp_robots'} callback:
   158  * Typical usage is as a {@see 'wp_robots'} callback:
   169 	$robots['noarchive'] = true;
   169 	$robots['noarchive'] = true;
   170 	return $robots;
   170 	return $robots;
   171 }
   171 }
   172 
   172 
   173 /**
   173 /**
   174  * Adds 'max-image-preview:large' to the robots meta tag.
   174  * Adds `max-image-preview:large` to the robots meta tag.
   175  *
   175  *
   176  * This directive tells web robots that large image previews are allowed to be
   176  * This directive tells web robots that large image previews are allowed to be
   177  * displayed, e.g. in search engines, unless the blog is marked as not being public.
   177  * displayed, e.g. in search engines, unless the blog is marked as not being public.
   178  *
   178  *
   179  * Typical usage is as a {@see 'wp_robots'} callback:
   179  * Typical usage is as a {@see 'wp_robots'} callback: