Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24825 closed enhancement (wontfix)

Print wp_no_robots only once

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

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 11 years ago.
24825.diff (493 bytes) - added by wonderboymusic 11 years ago.

Download all attachments as: .zip

Change History (9)

#1 @tivnet
11 years ago

  • Type changed from enhancement to defect (bug)
  • Version 3.6 deleted

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

#2 follow-up: @SergeyBiryukov
11 years ago

  • Milestone changed from Awaiting Review to 3.7

#3 @wonderboymusic
11 years ago

  • Milestone changed from 3.7 to Future Release
  • Type changed from defect (bug) to 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
11 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
11 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
11 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
11 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.