Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#24825 closed enhancement (wontfix)

Print wp_no_robots only once

Reported by: tivnet Owned by:
Priority: normal Milestone:
Component: Template Version:
Severity: trivial Keywords: has-patch
Cc: Focuses:

Description

This patch will not allow printing meta robots tag more than once (if called by different plugins).

P.S.
I'd think about a more universal method, wp_meta_robots({parameters}), which every developer should use. Or something in the lines of "wp_register / wp_enqueue" - for all meta tags.

Attachments (2)

wp_no_robots.patch​ (459 bytes ) - added by tivnet 13 years ago.
24825.diff​ (493 bytes ) - added by wonderboymusic 13 years ago.

Download all attachments as: .zip

Change History (9)

#1 @tivnet
13 years ago

  • Type enhancement → defect (bug)
  • Version 3.6

Could you please make any resolution on this?
Thank you!

#2 follow-up: @SergeyBiryukov
13 years ago

  • Milestone Awaiting Review → 3.7

#3 @wonderboymusic
13 years ago

  • Milestone 3.7 → Future Release
  • Type defect (bug) → enhancement

This is a utility function - it's not a bug if it is called more than once.

#4 in reply to: ↑ 2 ; follow-up: @tivnet
13 years ago

Replying to SergeyBiryukov:

Sergey, this change is so obvious (to me) and so tiny - yet it stays here for 2 months? This meta must not be printed more than once.

#5 in reply to: ↑ 4 ; follow-up: @nacin
13 years ago

Replying to tivnet:

Replying to SergeyBiryukov:

Sergey, this change is so obvious (to me) and so tiny - yet it stays here for 2 months? This meta must not be printed more than once.

That's what I'm curious about. Why must it not be printed more than once? Do search engines ignore it all together? Does the page not validate? Does the browser refuse to load the page?

This isn't necessarily a utility function. It should be attached to wp_head. It can be used with add_action() repeatedly and it'll still only be printed once.

#6 in reply to: ↑ 5 @tivnet
13 years ago

Replying to nacin:
You know, you are right it really does not matter. There should be a good function that collects and prints meta tags all together, with all possible options, and without duplication. As it is now - it's better just not to use in own development, and leave it for the core internal use.

Let's scratch this ticket.

#7 @SergeyBiryukov
13 years ago

  • Milestone Future Release
  • Resolution → wontfix
  • Status new → closed
Note: See TracTickets for help on using tickets.