[wp-trac] [WordPress Trac] #43791: Add the call to pingback_url to core instead of themes
WordPress Trac
noreply at wordpress.org
Tue Apr 17 20:03:24 UTC 2018
#43791: Add the call to pingback_url to core instead of themes
------------------------------+-----------------------------
Reporter: joyously | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Pings/Trackbacks | Version:
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
The `<head>` section contains a lot of `<link>` items that WordPress core
generates.
Why should themes be responsible for outputting the `pingback_url()`
`<link>`?
The core code should remove this burden from the theme and ensure that it
is handled every time and correctly. Currently, the theme needs code like
this:
{{{
function mytheme_pingback_header() {
if ( is_singular() && pings_open() ) {
echo '<link rel="pingback" href="', esc_url( get_bloginfo(
'pingback_url' ) ), '">';
}
}
add_action( 'wp_head', 'mytheme_pingback_header' );
}}}
and a lot of themes don't even have it, so then there are core options
that don't work correctly. This logic belongs in core.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43791>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list