Split up head meta function
This commit is contained in:
parent
6a6a624321
commit
21fed199cb
@ -265,7 +265,7 @@ Fictioneer customizes WordPress by using as many standard action and filter hook
|
||||
| `wp_dashboard_setup` | `fictioneer_remove_dashboard_widgets`
|
||||
| `wp_default_scripts` | `fictioneer_remove_jquery_migrate`
|
||||
| `wp_enqueue_scripts` | `fictioneer_add_custom_scripts`, `fictioneer_customizer_queue`, `fictioneer_style_queue`
|
||||
| `wp_head` | `fictioneer_output_head_seo`, `fictioneer_output_rss`, `fictioneer_output_schemas`, `fictioneer_add_fiction_css`
|
||||
| `wp_head` | `fictioneer_output_head_seo`, `fictioneer_output_rss`, `fictioneer_output_schemas`, `fictioneer_add_fiction_css`, `fictioneer_output_head_fonts`
|
||||
| `wp_update_nav_menu` | `fictioneer_purge_nav_menu_transients`
|
||||
|
||||
<br>
|
||||
|
@ -48,7 +48,7 @@ if ( is_archive() || is_search() || is_404() ) {
|
||||
|
||||
<head>
|
||||
<?php
|
||||
// Includes charset, content type, viewport, fonts, etc...
|
||||
// Includes charset, content type, viewport, etc...
|
||||
fictioneer_output_head_meta();
|
||||
|
||||
// Prevent indexing if required
|
||||
|
@ -1045,7 +1045,7 @@ if ( ! function_exists( 'fictioneer_output_head_meta' ) ) {
|
||||
* Output HTML <head> meta
|
||||
*
|
||||
* @since 5.0.0
|
||||
* @since 5.10.0 - Refactor for font manager.
|
||||
* @since 5.10.0 - Split up for font manager.
|
||||
*/
|
||||
|
||||
function fictioneer_output_head_meta() {
|
||||
@ -1057,8 +1057,23 @@ if ( ! function_exists( 'fictioneer_output_head_meta' ) ) {
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="theme-color" content="<?php echo '#' . get_background_color(); ?>">
|
||||
<meta name="referrer" content="strict-origin-when-cross-origin">
|
||||
<?php fictioneer_output_critical_fonts(); ?>
|
||||
<?php // <--- End HTML
|
||||
}
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// OUTPUT HEAD FONTS
|
||||
// =============================================================================
|
||||
|
||||
/**
|
||||
* Output font stylesheets <head> meta
|
||||
*
|
||||
* @since 5.10.0
|
||||
*/
|
||||
|
||||
function fictioneer_output_head_fonts() {
|
||||
// Critical path fonts
|
||||
fictioneer_output_critical_fonts();
|
||||
|
||||
// Bundled fonts
|
||||
$bundled_fonts = WP_CONTENT_DIR . '/themes/fictioneer/cache/bundled-fonts.css';
|
||||
@ -1089,8 +1104,8 @@ if ( ! function_exists( 'fictioneer_output_head_meta' ) ) {
|
||||
<noscript><link rel="stylesheet" href="<?php echo $full_fonts_href; ?>"></noscript>
|
||||
<?php // <--- End HTML
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'wp_head', 'fictioneer_output_head_fonts', 5 );
|
||||
|
||||
// =============================================================================
|
||||
// MODIFY ROBOTS META
|
||||
|
Loading…
x
Reference in New Issue
Block a user