Merge pull request #921 from schnoggo/master

Make extras functions pluggable - thx @schnoggo
This commit is contained in:
Holger 2019-02-27 09:48:13 +01:00 committed by GitHub
commit 98b2107d33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 13 deletions

View File

@ -111,22 +111,26 @@ if ( ! function_exists ( 'understrap_post_nav' ) ) {
}
}
/**
* Add a pingback url auto-discovery header for single posts of any post type.
*/
function understrap_pingback() {
if ( is_singular() && pings_open() ) {
echo '<link rel="pingback" href="' . esc_url( get_bloginfo( 'pingback_url' ) ) . '">' . "\n";
if ( ! function_exists( 'understrap_pingback' ) ) {
/**
* Add a pingback url auto-discovery header for single posts of any post type.
*/
function understrap_pingback() {
if ( is_singular() && pings_open() ) {
echo '<link rel="pingback" href="' . esc_url( get_bloginfo( 'pingback_url' ) ) . '">' . "\n";
}
}
}
add_action( 'wp_head', 'understrap_pingback' );
/**
* Add mobile-web-app meta.
*/
function understrap_mobile_web_app_meta() {
echo '<meta name="mobile-web-app-capable" content="yes">' . "\n";
echo '<meta name="apple-mobile-web-app-capable" content="yes">' . "\n";
echo '<meta name="apple-mobile-web-app-title" content="' . esc_attr( get_bloginfo( 'name' ) ) . ' - ' . esc_attr( get_bloginfo( 'description' ) ) . '">' . "\n";
if ( ! function_exists( 'understrap_mobile_web_app_meta' ) ) {
/**
* Add mobile-web-app meta.
*/
function understrap_mobile_web_app_meta() {
echo '<meta name="mobile-web-app-capable" content="yes">' . "\n";
echo '<meta name="apple-mobile-web-app-capable" content="yes">' . "\n";
echo '<meta name="apple-mobile-web-app-title" content="' . esc_attr( get_bloginfo( 'name' ) ) . ' - ' . esc_attr( get_bloginfo( 'description' ) ) . '">' . "\n";
}
}
add_action( 'wp_head', 'understrap_mobile_web_app_meta' );