[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> robots-template.php (summary)

Robots template functions.

File Size: 193 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions

  wp_robots()
  wp_robots_noindex()
  wp_robots_noindex_embeds()
  wp_robots_noindex_search()
  wp_robots_no_robots()
  wp_robots_sensitive_page()
  wp_robots_max_image_preview_large()

Functions
Functions that are not part of a class:

wp_robots()   X-Ref
Displays the robots meta tag as necessary.

Gathers robots directives to include for the current context, using the
{@see 'wp_robots'} filter. The directives are then sanitized, and the
robots meta tag is output if there is at least one relevant directive.


wp_robots_noindex( array $robots )   X-Ref
Adds noindex to the robots meta tag if required by the site configuration.

If a blog is marked as not being public then noindex will be output to
tell web robots not to index the page content. Add this to the
{@see 'wp_robots'} filter.

Typical usage is as a {@see 'wp_robots'} callback:

add_filter( 'wp_robots', 'wp_robots_noindex' );

param: array $robots Associative array of robots directives.
return: array Filtered robots directives.

wp_robots_noindex_embeds( array $robots )   X-Ref
Adds noindex to the robots meta tag for embeds.

Typical usage is as a {@see 'wp_robots'} callback:

add_filter( 'wp_robots', 'wp_robots_noindex_embeds' );

param: array $robots Associative array of robots directives.
return: array Filtered robots directives.

wp_robots_noindex_search( array $robots )   X-Ref
Adds noindex to the robots meta tag if a search is being performed.

If a search is being performed then noindex will be output to
tell web robots not to index the page content. Add this to the
{@see 'wp_robots'} filter.

Typical usage is as a {@see 'wp_robots'} callback:

add_filter( 'wp_robots', 'wp_robots_noindex_search' );

param: array $robots Associative array of robots directives.
return: array Filtered robots directives.

wp_robots_no_robots( array $robots )   X-Ref
Adds noindex to the robots meta tag.

This directive tells web robots not to index the page content.

Typical usage is as a {@see 'wp_robots'} callback:

add_filter( 'wp_robots', 'wp_robots_no_robots' );

param: array $robots Associative array of robots directives.
return: array Filtered robots directives.

wp_robots_sensitive_page( array $robots )   X-Ref
Adds noindex and noarchive to the robots meta tag.

This directive tells web robots not to index or archive the page content and
is recommended to be used for sensitive pages.

Typical usage is as a {@see 'wp_robots'} callback:

add_filter( 'wp_robots', 'wp_robots_sensitive_page' );

param: array $robots Associative array of robots directives.
return: array Filtered robots directives.

wp_robots_max_image_preview_large( array $robots )   X-Ref
Adds 'max-image-preview:large' to the robots meta tag.

This directive tells web robots that large image previews are allowed to be
displayed, e.g. in search engines, unless the blog is marked as not being public.

Typical usage is as a {@see 'wp_robots'} callback:

add_filter( 'wp_robots', 'wp_robots_max_image_preview_large' );

param: array $robots Associative array of robots directives.
return: array Filtered robots directives.



Generated : Mon Oct 18 08:20:03 2021 Cross-referenced by PHPXref