' . "\n"; } endif; add_action( 'wp_head', 'bizznis_load_favicon' ); /** * Echo favicon link if one is found. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_load_favicon' ) ) : function bizznis_load_favicon( $favicon = '' ) { # Use WP site icon, if available if ( function_exists( 'has_site_icon' ) && has_site_icon() ) { return; } # Allow child theme to short-circuit this function $pre = apply_filters( 'bizznis_pre_load_favicon', false ); if ( $pre !== false ) { $favicon = $pre; } elseif ( file_exists( CHILD_DIR . '/images/favicon.ico' ) ) { $favicon = CHILD_URL . '/images/favicon.ico'; } elseif ( file_exists( CHILD_DIR . '/images/favicon.gif' ) ) { $favicon = CHILD_URL . '/images/favicon.gif'; } elseif ( file_exists( CHILD_DIR . '/images/favicon.png' ) ) { $favicon = CHILD_URL . '/images/favicon.png'; } elseif ( file_exists( CHILD_DIR . '/images/favicon.jpg' ) ) { $favicon = CHILD_URL . '/images/favicon.jpg'; } # URL to favicon is filtered via 'bizznis_favicon_url' before being echoed. $favicon = apply_filters( 'bizznis_favicon_url', $favicon ); if ( $favicon ) { echo '' . "\n"; } } endif; add_action( 'wp_head', 'bizznis_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 */ if ( ! function_exists( 'bizznis_do_meta_pingback' ) ) : function bizznis_do_meta_pingback() { echo '' . "\n"; } endif; add_action( 'wp_head', 'bizznis_paged_rel' ); /** * Output rel links in the head to indicate previous and next pages in paginated archives and posts. * * @link http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html * * @since 1.2.2 */ if ( ! function_exists( 'bizznis_paged_rel' ) ) : function bizznis_paged_rel() { global $wp_query; $prev = $next = ''; $paged = intval( get_query_var( 'paged' ) ); $page = intval( get_query_var( 'page' ) ); if ( ! is_singular() ) { $prev = $paged > 1 ? get_previous_posts_page_link() : $prev; $next = $paged < $wp_query->max_num_pages ? get_next_posts_page_link( $wp_query->max_num_pages ) : $next; } else { //* No need for this on previews if ( is_preview() ) { return ''; } $numpages = substr_count( $wp_query->post->post_content, '' ) + 1; if ( $numpages && ! $page ) { $page = 1; } if ( $page > 1 ) { $prev = bizznis_paged_post_url( $page - 1 ); } if ( $page < $numpages ) { $next = bizznis_paged_post_url( $page + 1 ); } } if ( $prev ) { printf( '' . "\n", esc_url( $prev ) ); } if ( $next ) { printf( '' . "\n", esc_url( $next ) ); } } endif; add_action( 'wp_head', 'bizznis_meta_name' ); /** * Output meta tag for site name. * * @since 1.2.2 */ if ( ! function_exists( 'bizznis_meta_name' ) ) : function bizznis_meta_name() { printf( '' . "\n", get_bloginfo( 'name' ) ); } endif; add_action( 'wp_head', 'bizznis_meta_url' ); if ( ! function_exists( 'bizznis_meta_url' ) ) : /** * Output meta tag for site URL. * * @since 1.2.3 */ function bizznis_meta_url() { if ( ! is_front_page() ) { return; } printf( '' . "\n", trailingslashit( home_url() ) ); } endif; add_filter( 'bizznis_header_scripts', 'do_shortcode' ); add_action( 'wp_head', 'bizznis_header_scripts' ); /** * Echo header scripts in to wp_head(). * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_header_scripts' ) ) : function bizznis_header_scripts() { # Applies 'bizznis_header_scripts' filter on value stored in header_scripts setting. echo apply_filters( 'bizznis_header_scripts', bizznis_get_option( 'header_scripts' ) ); # If singular, echo scripts from custom field if ( is_singular() ) { bizznis_custom_field( '_bizznis_scripts' ); } } endif; add_action( 'after_setup_theme', 'bizznis_custom_header' ); /** * Activate the custom header feature. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_custom_header' ) ) : function bizznis_custom_header() { $wp_custom_header = get_theme_support( 'custom-header' ); # Stop here if not active (Bizznis of WP custom header) if ( ! $wp_custom_header ) { return; } # Blog title option is obsolete when custom header is active add_filter( 'bizznis_pre_get_option_blog_title', '__return_empty_array' ); } endif; add_action( 'bizznis_site_title', 'bizznis_site_title' ); /** * Echo the site title into the header. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_site_title' ) ) : function bizznis_site_title() { # Stop here if title is hiden if ( bizznis_get_option( 'hide_site_title' ) ) { return; } # Set what goes inside the wrapping tags $inside = sprintf( '%s', trailingslashit( home_url() ), get_bloginfo( 'name' ) ); # Determine which wrapping tags to use $wrap = bizznis_is_root_page() ? 'h1' : 'p'; # A little fallback, in case an SEO plugin is active $wrap = bizznis_is_root_page() ? 'h1' : $wrap; # Apply filter $wrap = apply_filters( 'bizznis_semantic_title_wrap', $wrap ); # Build the title $title = sprintf( "<{$wrap} %s>", bizznis_attr( 'site-title' ) ). $inside ."{$wrap}>"; # Echo (filtered) echo apply_filters( 'bizznis_seo_title', $title, $inside, $wrap ); } endif; add_action( 'bizznis_site_title', 'bizznis_site_description' ); /** * Echo the site description into the header. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_site_description' ) ) : function bizznis_site_description() { # Stop here if tagline is hiden if ( bizznis_get_option( 'hide_tagline' ) ) { return; } # Set what goes inside the wrapping tags $inside = esc_html( get_bloginfo( 'description' ) ); # Determine which wrapping tags to use $wrap = apply_filters( 'bizznis_semantic_description_wrap', 'p' ); # Build the description $description = sprintf( "<{$wrap} %s>", bizznis_attr( 'site-description' ) ). $inside ."{$wrap}>"; # Output (filtered) $output = $inside ? apply_filters( 'bizznis_seo_description', $description, $inside, $wrap ) : ''; echo $output; } endif; add_action( 'bizznis_after_site_title', 'bizznis_header_widget_area' ); /** * Echo the header widgets into the header. * * @since 1.1.8 */ if ( ! function_exists( 'bizznis_header_widget_area' ) ) : function bizznis_header_widget_area() { global $wp_registered_sidebars; if ( ( isset( $wp_registered_sidebars['header-aside'] ) && is_active_sidebar( 'header-aside' ) ) || has_action( 'bizznis_header_aside' ) ) { printf( '