', esc_url( get_bloginfo( 'pingback_url' ) ) ); } } add_action( 'wp_head', 'buzz_magazine_pingback_header' ); if ( ! function_exists( 'buzz_magazine_breadcrumb' ) ) : /** * Simple breadcrumb. * * @since 1.0.0 * * @link: https://gist.github.com/melissacabral/4032941 * * @param array $args Arguments */ function buzz_magazine_breadcrumb( $args = array() ) { if ( ! function_exists( 'breadcrumb_trail' ) ) { require_once get_template_directory() . '/inc/library/breadcrumbs.php'; } $breadcrumb_args = array( 'container' => 'div', 'show_browse' => false, 'show_on_front' => false, ); breadcrumb_trail( $breadcrumb_args ); } endif; /** * Page Structure */ function buzz_magazine_page_structure() { $page_structure = get_theme_mod( 'sortable_page', array( 'image', 'title', 'content' ) ); if ( ! is_array( $page_structure ) ) { $page_structure_array = explode( ',', $page_structure ); } else { $page_structure_array = $page_structure; } if ( is_array( $page_structure_array ) ) { foreach ( $page_structure_array as $structure ) { switch ( $structure ) { case 'title': echo '

'; the_title(); echo '

'; break; case 'image': if ( has_post_thumbnail() ) : echo '
'; the_post_thumbnail( 'full' ); echo '
'; endif; break; case 'content': echo '
'; the_content(); array( 'before' => '', ); echo '
'; } } } } /** * Content Type */ function buzz_magazine_content_type() { if ( get_theme_mod( 'buzz_magazine_content_type', 'content' ) == 'content' ) { the_content(); } else { the_excerpt(); } } function buzz_magazine_get_slider_template_layout() { return get_theme_mod( 'buzz_magazine_slider_layout', 'layout-one' ); } /** * Featured number posts * * @return int */ function buzz_magazine_get_featured_posts_count() { $layout = buzz_magazine_get_slider_template_layout(); switch ( $layout ) { case 'layout-one': default: $count = 2; break; case 'layout-two': $count = 6; break; } return $count; } /** * Top Header Email And Number Option */ function buzz_magazine_get_top_header_select_email_number() { ?>
'top-header', 'menu_class' => 'top-header-btn', 'depth' => 1, ) ); } /** * Social Icon */ function buzz_magazine_get_social_icon() { if ( has_nav_menu( 'social-icon' ) ) { wp_nav_menu( array( 'theme_location' => 'social-icon', 'menu_class' => 'menu', 'menu_id' => 'menu-social-menu', 'container_class' => 'social-links', 'depth' => 1, ) ); } } /** * Header Breadcrumb * * @since 1.0.0 */ function buzz_magazine_header_breadcrumb() { if ( is_front_page() || is_home() ) { return; } if ( ! get_theme_mod( 'toggle_master_breadcrumb', true ) ) { return; } if ( ! is_single() && ! is_archive() && ! is_404() ) { return; } ?>
esc_html__( 'Aarambha Demo Sites', 'buzz-magazine' ), // The plugin name 'slug' => 'aarambha-demo-sites', // The plugin slug (typically the folder name) 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), ); $config = array( 'id' => 'buzz-magazine', // Unique ID for hashing notices for multiple instances of TGMPA. 'default_path' => '', // Default absolute path to bundled plugins. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => false, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. ); tgmpa( $plugins, $config ); } add_action( 'tgmpa_register', 'buzz_magazine_register_required_plugins' ); if ( ! function_exists( 'buzz_magazine_fonts_url' ) ) : // Google Fonts URL function buzz_magazine_fonts_url() { $font_families = array( 'Cairo:wght@300;400;600;700;900', ); $fonts_url = add_query_arg( array( 'family' => implode( '&family=', $font_families ), 'display' => 'swap', ), 'https://fonts.googleapis.com/css2' ); return esc_url_raw( $fonts_url ); } endif;