>
= 2 || $page >= 2 ) && ! is_404() ) { /* translators: %s: page number */ $title = "$title $sep " . sprintf( esc_html__( 'Page %s', 'analytica' ), max( $paged, $page ) ); } return $title; } add_action( 'analytica_meta', 'analytica_browser_theme_color' ); /** * Optionally output the theme color tag. * * Child theme needs to support 'analytica-responsive-viewport'. * * Applies `analytica_viewport_value` filter on content attribute. * * @since 1.0.6 * * @return null Return early if child theme does not support theme color tag. */ function analytica_browser_theme_color() { if ( ! current_theme_supports( 'analytica-browser-theme-color' ) ) { return; } /** * Filter the viewport meta tag value. * * @param string $viewport_default Default value of the theme color meta tag. */ $value = apply_filters( 'analytica_browser_theme_color_value', analytica_get_option('site-accent-color') ); printf( '' . "\n", esc_attr( $value ) ); } add_action( 'analytica_meta', 'analytica_responsive_viewport' ); /** * Optionally output the responsive CSS viewport tag. * * Child theme needs to support 'analytica-responsive-viewport'. * * Applies `analytica_viewport_value` filter on content attribute. * * @since 1.0.0 * * @return null Return early if child theme does not support viewport. */ function analytica_responsive_viewport() { if ( ! current_theme_supports( 'analytica-responsive-viewport' ) ) { return; } /** * Filter the viewport meta tag value. * * @param string $viewport_default Default value of the viewport meta tag. */ $viewport_value = apply_filters( 'analytica_viewport_value', 'width=device-width, initial-scale=1' ); printf( '' . "\n", esc_attr( $viewport_value ) ); } add_action( 'wp_head', 'analytica_do_meta_pingback' ); /** * Adds the pingback meta tag to the head so that other sites can know how to send a pingback to our site. * * @since 1.0.0 */ function analytica_do_meta_pingback() { if ( 'open' === get_option( 'default_ping_status' ) ) { echo '' . "\n"; } } add_action( 'analytica_site_title', 'analytica_site_title' ); /** * Echo the site title in the header. * * Applies the 'analytica_title' filter before echoing. * * @since 1.0.0 */ function analytica_site_title() { // Build the title $output = '', 'context' => 'site-description', )); echo esc_html( get_bloginfo( 'description' ) ); analytica_markup( array( 'element' => '
', )); } add_action( 'analytica_header_before', 'analytica_site_skip_link', 5 ); /** * Echo the site skip link in the header. * * @since 1.0.0 */ function analytica_site_skip_link () { ?>hero = new \Analytica\Site_Hero(); } add_action( 'analytica_content_top', 'analytica_do_hero', 2 ); /** * Echo the default header, including the #title-area div, along with #title and #description, as well as the .widget-area. * * Added at prioriy 11 incase we want to insert something before the page headers * * @since 1.0.0 */ function analytica_do_hero() { if ( ! analytica_is_site_hero_available() ) { return; } analytica()->hero->do_header(); }