#38134 closed enhancement (worksforme)
Allow wp_no_robots to be hooked
| Reported by: | tomdxw | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 4.6.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
It was decided in #22876 that
<meta name='robots' content='noindex,nofollow' />
would be replaced with
<meta name='robots' content='noindex,follow' />
But for those who would prefer noindex,nofollow there's no way to change it without a lot of hassle.
A change as simple as this would make it very flexible:
function wp_no_robots() {
echo apply_filters('wp_no_robots', "<meta name='robots' content='noindex,follow' />\n");
}
Change History (3)
This ticket was mentioned in Slack in #core by noisysocks. View the logs.
6 years ago
#2
follow-up:
↓ 3
@
6 years ago
- Milestone Awaiting Review
- Resolution → worksforme
- Status new → closed
#3
in reply to: ↑ 2
@
6 years ago
Replying to peterwilsoncc:
it may have changed since this ticket was opened but it is now possible to unhook the
wp_no_robotsfunction.
Just to clarify, that was always the case since its introduction in [19304].
Version 0, edited 6 years ago by
(next)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This was discussed in a triage session today, it may have changed since this ticket was opened but it is now possible to unhook the
wp_no_robotsfunction.The following code will remove it and similar code to that above can be used to hook on to wp_head.
It's also worth noting that for private blogs, for example those with search engine indexing disabled, the default meta tag content was changed to
nofollow