[ Index ]

PHP Cross Reference of WordPress

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.

since: 5.7.0
since: 5.7.1 No longer prevents specific directives to occur together.

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' );

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

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' );

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

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' );

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

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' );

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

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' );

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

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' );

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



Generated: Sat Nov 23 01:00:02 2024 Cross-referenced by PHPXref 0.7.1