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

WordPress Trac noreply at wordpress.org
Tue Oct 13 19:51:16 UTC 2020


#51511: Introduce Robots API and Media Search Engine Visibility setting
-----------------------------+------------------------------------------
 Reporter:  flixos90         |      Owner:  flixos90
     Type:  feature request  |     Status:  assigned
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:
 Severity:  normal           |   Keywords:  needs-patch needs-unit-tests
  Focuses:                   |
-----------------------------+------------------------------------------
 As proposed in the [https://make.wordpress.org/core/2020/09/15/enhancing-
 image-preview-core-proposal/ "Enhancing image preview: core proposal"
 announcement post], this ticket aims at introducing the following:

 * A simple filter-based Robots API to centrally manage content of the
 `robots` meta tag injected into the page.
 * A setting to toggle whether search engines are allowed to display large
 media from the site.
 * A `max-image-preview:large` robots directive which will be injected into
 the `robots` meta tag based on the new setting.

 There are a couple of extra requirements:
 * The new Robots API should by default not include any directives (i.e. no
 `robots` meta tag would be printed). All WP core directives should be
 injected via their own filter callback functions.
 * The default behavior of which directives core injects should mirror
 core's behavior of today (with the only exception being the new
 conditional `max-image-preview:large` directive). More technically
 speaking, today's `wp_head` action callbacks to render `robots` meta tags
 should become `wp_robots` filter callbacks instead.
 * The setting that toggles the new directive should be exposed as a
 checkbox in ''Settings > Reading'', together with the existing checkbox to
 control search engine visibility.
 * The setting should be enabled by default. However, in addition to
 relying on the setting, the `max-image-preview:large` directive should
 only be injected if the site is also allowing search engine indexing. More
 technically speaking, `blog_public` takes precedence over the new setting.
 * An admin pointer should inform users about the new setting, its default
 and what this means for WordPress behavior.

 Side note: The filter-based Robots API this ticket aims to introduce
 should furthermore address #20037, which also requests `robots`
 customization, just a bit less comprehensively.

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


More information about the wp-trac mailing list