[wp-trac] [WordPress Trac] #51511: Introduce Robots API and Media Search Engine Visibility setting

WordPress Trac noreply at wordpress.org
Fri Feb 5 20:19:08 UTC 2021


#51511: Introduce Robots API and Media Search Engine Visibility setting
-------------------------------------------------+-------------------------
 Reporter:  flixos90                             |       Owner:  flixos90
     Type:  feature request                      |      Status:  closed
 Priority:  normal                               |   Milestone:  5.7
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note commit                                    |
-------------------------------------------------+-------------------------

Comment (by flixos90):

 @hellofromtonya I added some Robots API QA testing points below:

 **New default Robots behavior**

 * Ensure that for a site where search engines are not discouraged a Robots
 meta tag with `max-image-preview:large` directive is present in the
 frontend.

 **New API usage**

 Test the following three cases individually:
 * Activate a custom one-line plugin with `remove_all_filters( 'wp_robots'
 );`. Ensure that the frontend now does not display any Robots meta tag.
 * Activate a custom one-line plugin with `remove_filter( 'wp_robots',
 'wp_robots_max_image_preview_large' );`. Ensure that the frontend now does
 not display any Robots meta tag (since that is the only directive added by
 default).
 * Activate a custom one-line plugin with `add_filter( 'wp_robots',
 function( $robots ) { $robots['follow'] = true; return $robots; } );`.
 Ensure that the frontend now does not only include the default `max-image-
 preview:large` Robots directive, but also includes `follow` within the
 same Robots meta tag.

 **Prevent breakage**

 * Ensure that, when the checkbox to discourage the site from being indexed
 by search engines is enabled, the frontend includes a `noindex,nofollow`
 directive in the Robots meta tag like before.
 * Ensure that, within the Customizer preview, the site includes a
 `noindex` directive in the Robots meta tag like before.
 * Ensure that the WordPress login page (`wp-activate.php`) includes a
 `noindex,noarchive` directive in the Robots meta tag, as well as a `<meta
 name='referrer' content='strict-origin-when-cross-origin' />` tag, like
 before.
 * Multisite: Ensure that the site activation page (`wp-activate.php`),
 where a newly registered user can confirm their newly created site,
 includes a `noindex,noarchive` directive in the Robots meta tag, as well
 as a `<meta name='referrer' content='strict-origin-when-cross-origin' />`
 tag, like before.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51511#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list