>
= 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_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. * * @since 1.5.4 * * @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( 'wp_head', 'analytica_rel_author' ); /** * Echo custom rel="author" link tag. * * If the appropriate information has been entered, either for the homepage author, or for an individual post/page * author, echo a custom rel="author" link. * * @since 1.9.0 * * @uses analytica_get_option() Get SEO setting value. * * @return null Return null on failure. */ function analytica_rel_author() { $post = get_post(); if ( is_singular() && post_type_supports( $post->post_type, 'analytica-rel-author' ) && isset( $post->post_author ) && $gplus_url = get_user_option( 'googleplus', $post->post_author ) ) { printf( '' . "\n", esc_url( $gplus_url ) ); return; } if ( is_author() && get_query_var( 'author' ) && $gplus_url = get_user_option( 'googleplus', get_query_var( 'author' ) ) ) { printf( '' . "\n", esc_url( $gplus_url ) ); return; } } add_action( 'wp_head', 'analytica_wpmu_signup_stylesheet', 1 ); /** * Remove Inline Style added by Multisite in the Signup Form * * @since 1.0.0 */ function analytica_wpmu_signup_stylesheet() { remove_action( 'wp_head', 'wpmu_signup_stylesheet' ); } add_action( 'wp_head', 'analytica_rel_publisher' ); /** * Echo custom rel="publisher" link tag. * * If the appropriate information has been entered and we are viewing the front page, echo a custom rel="publisher" link. * * @since 1.0.0 * * @uses analytica_get_option() Get SEO setting value. */ function analytica_rel_publisher() { if ( is_front_page() && $publisher_url = analytica_get_option( 'site-publisher-uri' ) ) { printf( '', esc_url( $publisher_url ) ); } } add_action( 'analytica_site_title', 'analytica_site_header_title' ); /** * Echo the site title into the header. * * Applies the 'analytica_title' filter before echoing. * * @since 1.0.0 */ function analytica_site_header_title() { // Build the title $output = '' . $inside . '
'; // Output (filtered) $output = $inside ? $description : ''; echo analytica_sanitize_html( $output ); // WPCS: XSS ok. } add_action( 'template_redirect', 'analytica_hero_support' ); /** * Page header support. * * @since 1.0.0 */ function analytica_hero_support() { analytica()->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(); }