Make WordPress Core

Opened 7 years ago

Closed 18 months ago

#42368 closed feature request (duplicate)

Create API for TITLES and other OPEN GRAPH data

Reported by: tazotodua's profile tazotodua Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:


every SEO or Optimization or META-related plugins see/inject their own meta tags in head of theme, as in many cases, there are multiple repeated tags in output:

<meta name="og:title"        content="title by plugin1"
some codes here
<meta name="og:title"        content="title by plugin2"


One plugin, which tries to overwrite other meta tags, has to use the undesired approach:

get_ob_contents() --->then preg-replace the matched meta tags and etc...

you know 90% of WP sites HAS TO USE META TAGS, ESPECIALLY FOR FACEBOOK, TWITTER, G+ share tags and some other.
Cant WordPress create a new API to standartize the process, for example, in the Core, there was:

add_action('wp_head', 'add_meta_tags_in_head');
function add_meta_tags_in_head(){ 
    //let people have ability to disable auto-generation of tags
        $title = get_the_title();  //or whatever
        echo '<meta name="og:title" content="'. apply_filters("og_title", $title).'" />';
        $description= get_the_title();  //or whatever
        echo '<meta name="og:description" content="'. apply_filters("og_description", $description).'" />';

        .... and same for Twitter, G+ and some other ESSENTIAL, EVERY-DAY tags, to be available for filtering


Change History (7)

#1 @tazotodua
7 years ago

#42367 was marked as a duplicate.

#2 follow-up: @Presskopp
7 years ago

related #22998

#3 in reply to: ↑ 2 @tazotodua
7 years ago

Replying to Presskopp:

related #22998, when admins thought that protocol was not important.

but today, 90 % of sites use those protocols, more oftenly used that even BUILT-IN RSS/other meta tags !

Version 1, edited 7 years ago by tazotodua (previous) (next) (diff)

#4 @rinkuyadav999
7 years ago

  • Keywords close added

Sounds like plugin territory to me.

#5 @rinkuyadav999
7 years ago

  • Keywords dev-feedback added

#7 @desrosj
18 months ago

  • Keywords close dev-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #22998.

I'm going to close this one out. There hasn't been significant movement or interest in 5 years. I think that specifically Open Graph support is absolutely plugin territory. But I feel that a more generic API for meta tags is reasonable, and plugins could use it to implement whatever tags they'd like. That's best pursued in #31387 though.

Discussion can always continue on closed tickets and this can always be reopened in the future if anything changes.

Note: See TracTickets for help on using tickets.