Add mobile-web-app meta as action
Allows a child theme to remove the meta tags without changing the header.php.
This commit is contained in:
parent
95767decb0
commit
4b3a789172
|
@ -18,9 +18,6 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
<head>
|
<head>
|
||||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
||||||
<meta name="apple-mobile-web-app-title" content="<?php bloginfo( 'name' ); ?> - <?php bloginfo( 'description' ); ?>">
|
|
||||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||||
<?php wp_head(); ?>
|
<?php wp_head(); ?>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -122,3 +122,13 @@ function understrap_pingback() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
add_action( 'wp_head', 'understrap_pingback' );
|
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";
|
||||||
|
}
|
||||||
|
add_action( 'wp_head', 'understrap_mobile_web_app_meta' );
|
||||||
|
|
Reference in New Issue