mmended to be used for sensitive pages.
*
* Typical usage is as a {@see 'wp_robots'} callback:
*
* add_filter( 'wp_robots', 'wp_robots_sensitive_page' );
*
* @since 5.7.0
*
* @param array $robots Associative array of robots directives.
* @return array Filtered robots directives.
*/
function wp_robots_sensitive_page( array $robots ) {
$robots['noindex'] = true;
$robots['noarchive'] = true;
return $robots;
}
/**
* 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' );
*
* @since 5.7.0
*
* @param array $robots Associative array of robots directives.
* @return array Filtered robots directives.
*/
function wp_robots_max_image_preview_large( array $robots ) {
if ( get_option( 'blog_public' ) ) {
$robots['max-image-preview'] = 'large';
}
return $robots;
}
Warning: Cannot modify header information - headers already sent by (output started at /home/belpow5/portal.belfuse.com/rail/wp-includes/robots-template.php:1) in /home/belpow5/portal.belfuse.com/rail/wp-content/themes/beltrain/functions.php on line 4
Warning: Cannot modify header information - headers already sent by (output started at /home/belpow5/portal.belfuse.com/rail/wp-includes/robots-template.php:1) in /home/belpow5/portal.belfuse.com/rail/wp-includes/pluggable.php on line 1435
Warning: Cannot modify header information - headers already sent by (output started at /home/belpow5/portal.belfuse.com/rail/wp-includes/robots-template.php:1) in /home/belpow5/portal.belfuse.com/rail/wp-includes/pluggable.php on line 1438