false, 'hide_tagline' => false, 'site_title_font_size_desktop' => 30, 'site_tagline_font_size_desktop' => 16, 'site_tagline_style' => 'style_3', 'primary_color' => '#232222', 'accent_color' => '#0070e0', 'link_color' => '#252728', 'link_color_hover' => '#252728', 'h1_color' => '#252728', 'h2_color' => '#252728', 'h3_color' => '#252728', 'h4_color' => '#252728', 'h5_color' => '#252728', 'h6_color' => '#252728', 'header_social_links_color_as' => 'theme_color', 'header_social_links_icons_color' => '#505050', 'header_social_links_icons_hover_color' => '#0070e0', 'header_social_links_icons_bg_color' => '#e8e8e8', 'header_social_links_icons_hover_bg_color' => '#e8e8e8', 'header_social_links_display_style' => 'style_1', 'enable_header_social_links_label' => false, 'header_social_links_label_text' => '', 'header_social_links_label_color' => '#505050', 'header_search_btn_bg_color' => '#0070e0', 'enable_top_bar' => false, 'hide_top_bar_mobile' => true, 'stack_top_bar_col_responsive' => false, 'enable_topbar_border_bottom' => true, 'enable_todays_date' => true, 'todays_date_format' => 'F j, Y', 'enable_todays_time' => true, 'todays_time_hr12_format' => true, 'enable_topbar_social_nav' => true, 'enable_top_nav' => true, 'enable_random_post_top_bar' => false, 'enable_search_on_top_bar' => false, 'enable_woo_mini_cart_top_bar' => false, 'enable_woo_my_account_top_bar' => false, 'top_bar_theme' => 'light', 'top_bar_bg_color' => '#ffffff', 'top_bar_date_color' => '#505050', 'top_bar_nav_menu_color' => '#505050', 'top_bar_nav_menu_hover_color' => '#0070e0', 'top_bar_sub_menu_color' => '#505050', 'top_bar_sub_menu_hover_color' => '#000000', 'top_bar_sub_menu_bg_color' => '#ffffff', 'primary_menu_bg_color' => '#ffffff', 'offcanvas_icon_color' => '#505050', 'center_align_primary_nav' => false, 'enable_different_logo_menu_bar' => false, 'logo_menu_bar' => '', 'enable_top_border_menu_bar' => false, 'enable_bottom_border_menu_bar' => true, 'show_menu_bar_social_nav' => true, 'enable_random_post_menu_bar' => true, 'enable_search_on_menu_bar' => true, 'enable_woo_mini_cart_menu_bar' => true, 'enable_woo_my_account_menu_bar' => true, 'primary_menu_text_color' => '#505050', 'primary_menu_text_hover_color' => '#0070e0', 'primary_menu_text_hover_border' => '#ffffff', 'primary_menu_active_item_color' => '#000000', 'primary_menu_active_item_border' => '#0070e0', 'primary_menu_desc_color' => '#0070e0', 'capitalize_primary_nav_text' => false, 'sub_menu_style' => 'style_2', 'sub_menu_bg_color' => '#ffffff', 'sub_menu_text_color' => '#505050', 'sub_menu_text_hover_color' => '#0070e0', 'sub_menu_desc_color' => '#999999', 'capitalize_sub_nav_text' => false, 'header_bg_color' => '#ffffff', 'header_style' => 'header_style_3', 'enable_sticky_menu' => true, 'show_ad_banner' => false, 'ad_banner_image' => '', 'ad_banner_link' => '', 'global_border_radius_small' => 0, 'global_border_radius_medium' => 0, 'global_border_radius_large' => 0, 'center_logo' => true, 'show_preloader' => false, 'preloader_bg_color' => '#ffffff', 'preloader_color' => '#0070e0', 'show_progressbar' => true, 'progressbar_position' => 'top', 'progressbar_color' => '#0070e0', 'enable_breadcrumb' => false, 'breadcrumb_type' => 'simple', 'breadcrumb_link_color' => '#0070e0', 'global_buttons_text_color' => '#ffffff', 'global_buttons_text_hover_color' => '#ffffff', 'global_buttons_bg_color' => '#0070e0', 'global_buttons_bg_hover_color' => '#000000', 'global_buttons_border_color' => '#0070e0', 'global_buttons_border_hover_color' => '#000000', 'global_post_meta_icons_color' => '#0070e0', 'global_show_title_line_hover' => true, 'global_card_element_bg_color' => '#ffffff', 'global_card_element_inverted_bg_color' => '#1e1e1e', 'enable_ticker_posts' => true, 'ticker_theme' => 'light', 'ticker_section_bg_color' => '#ffffff', 'enable_ticker_label' => true, 'ticker_label_color' => '#ffffff', 'ticker_label_bg_color' => '#0070e0', 'ticker_loader_icon_color' => '#ffffff', 'ticker_label_text' => '', 'ticker_label_style' => 'style_3', 'ticker_posts_cat' => '', 'no_of_ticker_posts' => 4, 'ticker_posts_orderby' => 'date', 'ticker_posts_order' => 'desc', 'ticker_posts_meta' => array( 'date' ), 'ticker_posts_date_format' => 'format_2', 'ticker_posts_speed' => 3500, 'show_ticker_arrows' => true, 'show_ticker_posts_thumbnail' => true, 'circle_ticker_posts_thumbnail' => false, 'show_ticker_posts_category' => false, 'ticker_posts_category_color_display' => 'as_bg', 'ticker_posts_category_style' => 'style_2', 'ticker_posts_category_limit' => 1, 'stack_ticker_responsive' => true, 'hide_ticker_label_responsive' => false, 'hide_ticker_arrows_responsive' => false, 'hide_ticker_thumbnail_responsive' => false, 'hide_ticker_category_responsive' => true, 'hide_ticker_meta_responsive' => true, 'ticker_section_padding_top' => 20, 'ticker_section_padding_bottom' => 0, 'enable_banner' => false, 'banner_title' => '', 'banner_title_style' => 'style_1', 'banner_title_align' => 'left', 'banner_layout' => 'boxed', 'banner_display_as' => 'carousel', 'banner_carousel_item_gap' => 4, 'banner_content_from' => 'category', 'banner_cat' => '', 'no_of_banner_posts' => 4, 'banner_posts_orderby' => 'date', 'banner_posts_order' => 'desc', 'banner_post_ids' => '', 'enable_banner_autoplay' => false, 'banner_autoplay_speed' => 5000, 'enable_banner_arrows' => true, 'banner_arrows_bg_color' => '#ffffff', 'enable_banner_dots' => false, 'enable_banner_overlay' => true, 'banner_overlay_color' => '#000000', 'banner_overlay_opacity' => 0.6, 'show_banner_category' => true, 'banner_category_style' => 'style_5', 'banner_category_color_display' => 'as_color', 'banner_category_limit' => 1, 'banner_post_meta' => array( 'author', 'date' ), 'show_banner_post_meta_icon' => true, 'banner_posts_date_format' => 'format_2', 'enable_banner_author_image' => false, 'enable_banner_desc' => false, 'banner_desc_length' => 25, 'enable_banner_read_more_btn' => false, 'banner_read_more_btn_text' => '', 'banner_read_more_style' => 'style_3', 'banner_read_more_icon' => '', 'front_page_enable_sidebar' => false, 'home_page_layout' => 'right-sidebar', 'hide_front_page_sidebar_mobile' => false, 'front_page_sticky_sidebar' => true, 'home_sidebar_widget_style' => 'style_3', 'home_sidebar_widget_heading_style' => 'style_9', 'home_sidebar_widget_heading_align' => 'left', 'front_page_enable_sidebar_border' => false, 'enable_home_title' => false, 'front_page_content_title' => '', 'home_title_heading_style' => 'style_1', 'home_title_heading_align' => 'left', 'enable_pinned_posts' => false, 'pinned_posts_style' => 'style_2', 'pinned_posts_title' => '', 'pinned_posts_title_style' => 'style_1', 'pinned_posts_title_align' => 'left', 'pinned_posts_cat' => '', 'pinned_posts_content_from' => 'category', 'pinned_posts_ids' => '', 'show_pinned_posts_category' => true, 'pinned_posts_category_style' => 'style_2', 'pinned_posts_category_color_display' => 'as_bg', 'pinned_posts_category_limit' => 1, 'pinned_post_meta' => array(), 'show_pinned_post_meta_icon' => true, 'pinned_posts_date_format' => 'format_2', 'enable_pinned_posts_author_image' => false, 'enable_pinned_posts_overlay' => true, 'pinned_posts_overlay_color' => '#000000', 'pinned_posts_overlay_opacity' => 0.6, 'show_pinned_posts_post_format_icon' => false, 'enable_trending_posts' => false, 'trending_posts_title' => '', 'trending_posts_title_style' => 'style_1', 'trending_posts_title_align' => 'left', 'trending_posts_column' => '3', 'trending_posts_cat' => '', 'no_of_trending_posts' => 5, 'trending_posts_orderby' => 'date', 'trending_posts_order' => 'desc', 'show_trending_posts_category' => true, 'trending_posts_category_style' => 'style_1', 'trending_posts_category_color_display' => 'none', 'trending_posts_category_limit' => 3, 'trending_post_meta' => array(), 'show_trending_post_meta_icon' => true, 'trending_posts_date_format' => 'format_2', 'enable_trending_posts_author_image' => false, 'show_trending_posts_thumbnail' => true, 'invert_trending_posts_display' => false, 'show_trending_posts_post_format_icon' => false, 'enable_trending_posts_autoplay' => false, 'enable_trending_posts_loop' => false, 'enable_trending_posts_arrows' => true, 'enable_trending_posts_dots' => false, 'trending_posts_style' => 'style_2', 'trending_posts_counter' => '', 'primary_font' => '"Lora", "regular:500:600:700:italic:500italic:600italic:700italic", serif', 'primary_font_weight' => 700, 'secondary_font' => '"Work Sans", "100:200:300:regular:500:600:700:800:900:100italic:200italic:300italic:italic:500italic:600italic:700italic:800italic:900italic", sans-serif', 'secondary_font_weight' => 'normal', 'primary_menu_font' => '"Work Sans", "100:200:300:regular:500:600:700:800:900:100italic:200italic:300italic:italic:500italic:600italic:700italic:800italic:900italic", sans-serif', 'primary_menu_font_weight' => 400, 'sub_menu_font' => '"Work Sans", "100:200:300:regular:500:600:700:800:900:100italic:200italic:300italic:italic:500italic:600italic:700italic:800italic:900italic", sans-serif', 'sub_menu_font_weight' => 400, 'global_layout' => 'right-sidebar', 'hide_global_sidebar_mobile' => false, 'sticky_sidebar' => true, 'sidebar_widget_style' => 'style_3', 'sidebar_widget_heading_style' => 'style_9', 'sidebar_widget_heading_align' => 'left', 'global_enable_sidebar_border' => false, 'offcanvas_theme' => 'light', 'offcanvas_bg_color' => '#ffffff', 'dark_offcanvas_bg_color' => '#10100f', 'offcanvas_logo' => '', 'offcanvas_widgetarea_heading_style' => 'style_9', 'offcanvas_widgetarea_heading_align' => 'left', 'offcanvas_hide_desktop' => true, 'offcanvas_menu_hide_desktop' => true, 'offcanvas_menu_desc_color' => '#999999', 'below_header_widgets_style' => 'style_1', 'before_home_cols_widgets_style' => 'style_1', 'home_col_one_widgets_style' => 'style_1', 'home_col_two_widgets_style' => 'style_1', 'above_home_widgets_style' => 'style_1', 'before_home_posts_widgets_style' => 'style_1', 'after_home_posts_widgets_style' => 'style_1', 'below_home_widgets_style' => 'style_1', 'above_footer_widgets_style' => 'style_1', 'below_footer_widgets_style' => 'style_1', 'below_header_widgetarea_heading_style' => 'style_1', 'below_header_widgetarea_heading_align' => 'left', 'before_home_cols_widgetarea_heading_style' => 'style_1', 'before_home_cols_widgetarea_heading_align' => 'left', 'home_col_order' => 'style_1', 'home_col_one_widgetarea_heading_style' => 'style_1', 'home_col_one_widgetarea_heading_align' => 'left', 'home_col_two_widgetarea_heading_style' => 'style_1', 'home_col_two_widgetarea_heading_align' => 'left', 'home_col_two_widgetarea_hide_mobile' => false, 'above_home_widgetarea_heading_style' => 'style_1', 'above_home_widgetarea_heading_align' => 'left', 'before_home_posts_widgetarea_heading_style' => 'style_1', 'before_home_posts_widgetarea_heading_align' => 'left', 'after_home_posts_widgetarea_heading_style' => 'style_1', 'after_home_posts_widgetarea_heading_align' => 'left', 'below_home_widgetarea_heading_style' => 'style_1', 'below_home_widgetarea_heading_align' => 'left', 'above_footer_widgetarea_heading_style' => 'style_1', 'above_footer_widgetarea_heading_align' => 'left', 'above_footer_nc_widgetarea_heading_style' => 'style_1', 'above_footer_nc_widgetarea_heading_align' => 'left', 'below_footer_widgetarea_heading_style' => 'style_1', 'below_footer_widgetarea_heading_align' => 'left', 'below_footer_nc_widgetarea_heading_style' => 'style_1', 'below_footer_nc_widgetarea_heading_align' => 'left', 'single_post_layout' => 'right-sidebar', 'single_post_style' => 'single_style_1', 'enable_single_cat_label' => true, 'single_category_color_display' => 'as_bg', 'single_category_style' => 'style_2', 'single_category_limit' => 3, 'single_category_position' => 'after_content', 'enable_single_tag_label' => true, 'single_tag_style' => 'style_4', 'single_tag_limit' => 0, 'posts_navigation_style' => 'style_2', 'single_post_meta' => array( 'author', 'read_time', 'date', 'comment', 'category', 'tags' ), 'show_single_post_meta_icon' => false, 'center_align_single_header_meta' => false, 'single_date_format' => 'format_2', 'enable_single_author_image' => false, 'show_author_info' => true, 'enable_author_info_bg' => false, 'author_info_bg_color' => '#f8f9fa', 'author_info_text' => __( 'Written By', 'blogbyte' ), 'author_info_title_style' => 'style_1', 'author_info_title_align' => 'left', 'author_info_box_style' => 'style_1', 'stack_author_info_resposive' => false, 'single_comments_heading_style' => 'style_1', 'single_comments_heading_align' => 'left', 'single_comments_center_form_content' => false, 'show_related_posts' => false, 'related_posts_text' => __( 'You May Also Like', 'blogbyte' ), 'related_posts_title_style' => 'style_1', 'related_posts_title_align' => 'left', 'no_of_related_posts' => 3, 'related_posts_orderby' => 'date', 'related_posts_order' => 'desc', 'show_related_posts_category' => false, 'related_posts_category_color_display' => 'none', 'related_posts_category_style' => 'style_1', 'related_posts_category_limit' => 1, 'related_post_meta' => array( 'date' ), 'show_related_post_meta_icon' => false, 'related_posts_date_format' => 'format_2', 'enable_related_posts_author_image' => false, 'enable_related_posts_desc' => true, 'related_posts_desc_length' => 15, 'enable_related_posts_read_more_btn' => false, 'related_posts_read_more_btn_text' => '', 'related_posts_read_more_style' => 'style_2', 'related_posts_read_more_icon' => '', 'show_related_posts_post_format_icon' => false, 'author_posts_orderby' => 'date', 'author_posts_order' => 'desc', 'show_author_posts' => true, 'author_posts_text' => __( 'More From Author', 'blogbyte' ), 'author_posts_title_style' => 'style_1', 'author_posts_title_align' => 'left', 'no_of_author_posts' => 3, 'show_author_posts_category' => false, 'author_posts_category_color_display' => 'none', 'author_posts_category_style' => 'style_1', 'author_posts_category_limit' => 1, 'author_post_meta' => array( 'date' ), 'show_author_post_meta_icon' => false, 'author_posts_date_format' => 'format_2', 'enable_author_posts_author_image' => false, 'enable_author_posts_desc' => true, 'author_posts_desc_length' => 15, 'enable_author_posts_read_more_btn' => false, 'author_posts_read_more_btn_text' => '', 'author_posts_read_more_style' => 'style_2', 'author_posts_read_more_icon' => '', 'show_author_posts_post_format_icon' => false, 'archive_style' => 'archive_style_3', 'enable_archive_cat_label' => false, 'archive_category_color_display' => 'as_bg', 'archive_category_style' => 'style_2', 'archive_category_limit' => 3, 'archive_category_position' => 'before_title', 'enable_archive_tag_label' => true, 'archive_tag_style' => 'style_4', 'archive_tag_limit' => 0, 'pagination_type' => 'numeric', 'center_aligned_pagination' => true, 'archive_post_meta' => array( 'author', 'date', 'category', 'tags' ), 'show_archive_post_meta_icon' => false, 'archive_date_format' => 'format_2', 'enable_archive_author_image' => false, 'show_archive_post_format_icon' => false, 'show_archive_excerpt' => true, 'show_archive_read_more' => false, 'archive_read_more_style' => 'style_1', 'excerpt_length' => 48, 'max_excerpt_length' => 55, 'excerpt_read_more_text' => '', 'excerpt_read_more_icon' => '', 'show_static_page_content' => true, 'footer_theme' => 'light', 'footer_bg_color' => '#ffffff', 'dark_footer_bg_color' => '#000000', 'enable_footer_bg_image' => false, 'footer_fixed_bg_image' => false, 'footer_bg_image' => '', 'footer_bg_image_opacity' => 0.5, 'footer_bg_image_overlay_color' => '#000000', 'footer_column_layout' => 'footer_layout_2', 'footer_widget_heading_style' => 'style_9', 'footer_widget_heading_align' => 'left', 'enable_border_above_footer' => true, 'sub_footer_theme' => 'dark', 'sub_footer_bg_color' => '#ffffff', 'dark_sub_footer_bg_color' => '#000000', 'enable_border_above_sub_footer' => false, 'enable_copyright' => true, 'copyright_text' => esc_html__( 'Copyright © {{ date }}', 'blogbyte' ), 'copyright_date_format' => 'Y', 'enable_footer_credit' => true, 'enable_footer_nav' => false, 'enable_footer_social_nav' => false, 'footer_social_links_color' => 'theme_color', 'footer_social_links_display_style' => 'style_1', 'enable_scroll_to_top' => true, 'scroll_to_top_pos' => 'right', 'scroll_to_top_color' => '#ffffff', 'scroll_to_top_hover_color' => '#ffffff', 'scroll_to_top_bg_color' => '#0070e0', 'scroll_to_top_hover_bg_color' => '#0070e0', 'shop_page_enable_sidebar' => false, 'shop_page_disable_breadcrumb' => false, 'shop_page_layout' => 'right-sidebar', 'product_page_enable_sidebar' => false, 'product_page_disable_breadcrumb' => false, 'product_page_layout' => 'right-sidebar', 'trending_section_bg_color' => '#ffffff', 'banner_section_bg_color' => '#ffffff', 'below_header_widgetarea_bg_color' => '#ffffff', 'before_home_columns_widgetarea_bg_color' => '#ffffff', 'home_columns_widgetarea_bg_color' => '#ffffff', 'above_home_widgetarea_bg_color' => '#ffffff', 'below_home_widgetarea_bg_color' => '#ffffff', 'above_footer_widgetarea_bg_color' => '#ffffff', 'above_footer_nc_widgetarea_bg_color' => '#ffffff', 'below_footer_widgetarea_bg_color' => '#ffffff', 'below_footer_nc_widgetarea_bg_color' => '#ffffff', ); return $theme_options_defaults; } endif; if ( ! function_exists( 'blogbyte_get_fonts' ) ) : /** * Returns fonts array * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_fonts() { return blogbyte_get_google_fonts(); } endif; if ( ! function_exists( 'blogbyte_is_wc_active' ) ) : /** * Check WooCommerce Status * * @since 1.0.0 * * return boolean true/false */ function blogbyte_is_wc_active() { return class_exists( 'WooCommerce' ) ? true : false; } endif; if ( ! function_exists( 'blogbyte_placeholder_img_src' ) ) : /** * Get placeholder image * * @since 1.0.0 */ function blogbyte_placeholder_img_src() { $src = get_template_directory_uri() . '/assets/images/placeholder.png'; return apply_filters( 'blogbyte_placeholder_img_src', $src ); } endif; if ( ! function_exists( 'blogbyte_get_page_layout' ) ) : /** * Get Page Layout based on the post meta or customizer value * * @since 1.0.0 * * @return string Page Layout. */ function blogbyte_get_page_layout() { global $post; $page_layout = ''; // For homepage regardless of static page or latest posts. if ( is_front_page() ) { return get_theme_mod( 'home_page_layout', 'right-sidebar' ); } // For Posts page chosen on reading settings. if ( is_home() ) { return get_theme_mod( 'global_layout', 'right-sidebar' ); } // Fetch from Post Meta on single posts or pages. if ( $post && is_singular() ) { $page_layout = get_post_meta( $post->ID, 'blogbyte_page_layout', true ); if ( empty( $page_layout ) && is_single() ) { $page_layout = get_theme_mod( 'single_post_layout', 'right-sidebar' ); } } // Woocommerce. if ( blogbyte_is_wc_active() ) : if ( is_shop() || is_product_category() ) : $page_layout = get_theme_mod( 'shop_page_layout', 'right-sidebar' ); endif; if ( is_product() ) : $page_layout = get_theme_mod( 'product_page_layout', 'right-sidebar' ); endif; endif; // Fetch from customizer if everything else fails. if ( empty( $page_layout ) ) { $page_layout = get_theme_mod( 'global_layout', 'right-sidebar' ); } return $page_layout; } endif; if ( ! function_exists( 'blogbyte_get_sidebar' ) ) : /** * Get Proper sidebar based on settings * * @since 1.0.0 * * @return string Sidebar */ function blogbyte_get_sidebar() { $sidebar_style = blogbyte_get_sidebar_widget_style(); $heading_style = blogbyte_get_sidebar_heading_style(); $heading_align = blogbyte_get_sidebar_heading_align(); $class = $sidebar_style; $class .= ' ' . $heading_style; $class .= ' ' . $heading_align; if ( is_front_page() ) : $hide_sidebar_mobile = get_theme_mod( 'hide_front_page_sidebar_mobile' ); $class .= $hide_sidebar_mobile ? ' hide-on-mobile ' : ''; if ( get_theme_mod( 'front_page_enable_sidebar' ) ) : if ( is_active_sidebar( 'home-page-sidebar' ) ) : ?>
$width, 'height' => $height, 'crop' => $_wp_additional_image_sizes[ $_size ]['crop'], ); } } } if ( true == $for_choice ) { $sizes['full'] = __( 'Full Image', 'blogbyte' ); } return $sizes; } endif; if ( ! function_exists( 'blogbyte_get_header_layouts' ) ) : /** * Returns header layout options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_header_layouts() { $options = apply_filters( 'blogbyte_header_layouts', array( 'header_style_1' => array( 'url' => get_template_directory_uri() . '/assets/images/header1.png', 'label' => esc_html__( 'Header Style 1', 'blogbyte' ), ), 'header_style_2' => array( 'url' => get_template_directory_uri() . '/assets/images/header2.png', 'label' => esc_html__( 'Header Style 2', 'blogbyte' ), ), 'header_style_3' => array( 'url' => get_template_directory_uri() . '/assets/images/header3.png', 'label' => esc_html__( 'Header Style 3', 'blogbyte' ), ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_submenu_styles_arr' ) ) : /** * Returns submenu styles options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_submenu_styles_arr() { $options = apply_filters( 'blogbyte_submenu_styles_arr', array( 'style_1' => __( 'Style 1', 'blogbyte' ), 'style_2' => __( 'Style 2', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_footer_layouts' ) ) : /** * Returns footer layout options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_footer_layouts() { $options = apply_filters( 'blogbyte_footer_layouts', array( 'footer_layout_1' => array( 'url' => get_template_directory_uri() . '/assets/images/footer-col-4.png', 'label' => esc_html__( 'Four Columns', 'blogbyte' ), ), 'footer_layout_2' => array( 'url' => get_template_directory_uri() . '/assets/images/footer-col-3.png', 'label' => esc_html__( 'Three Columns', 'blogbyte' ), ), 'footer_layout_3' => array( 'url' => get_template_directory_uri() . '/assets/images/footer-col-2.png', 'label' => esc_html__( 'Two Columns', 'blogbyte' ), ), 'footer_layout_4' => array( 'url' => get_template_directory_uri() . '/assets/images/footer-col-2-big-left.png', 'label' => esc_html__( 'Two Columns Big Left', 'blogbyte' ), ), 'footer_layout_5' => array( 'url' => get_template_directory_uri() . '/assets/images/footer-col-3-big-middle.png', 'label' => esc_html__( 'Three Columns Big Middle', 'blogbyte' ), ), 'footer_layout_6' => array( 'url' => get_template_directory_uri() . '/assets/images/footer-col-2-big-right.png', 'label' => esc_html__( 'Two Columns Big Right', 'blogbyte' ), ), 'footer_layout_7' => array( 'url' => get_template_directory_uri() . '/assets/images/footer-col-1.png', 'label' => esc_html__( 'Single Column', 'blogbyte' ), ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_general_layouts' ) ) : /** * Returns general layout options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_general_layouts() { $options = apply_filters( 'blogbyte_general_layouts', array( 'left-sidebar' => array( 'url' => get_template_directory_uri() . '/assets/images/left_sidebar.png', 'label' => esc_html__( 'Left Sidebar', 'blogbyte' ), ), 'right-sidebar' => array( 'url' => get_template_directory_uri() . '/assets/images/right_sidebar.png', 'label' => esc_html__( 'Right Sidebar', 'blogbyte' ), ), 'no-sidebar' => array( 'url' => get_template_directory_uri() . '/assets/images/no_sidebar.png', 'label' => esc_html__( 'No Sidebar - Wide', 'blogbyte' ), ), 'no-sidebar-narrow' => array( 'url' => get_template_directory_uri() . '/assets/images/no_sidebar_narrow.png', 'label' => esc_html__( 'No Sidebar - Narrow', 'blogbyte' ), ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_archive_layouts' ) ) : /** * Returns archive layout options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_archive_layouts() { $options = apply_filters( 'blogbyte_archive_layouts', array( 'archive_style_1' => array( 'url' => get_template_directory_uri() . '/assets/images/archive1.png', 'label' => esc_html__( 'Single Column List', 'blogbyte' ), ), 'archive_style_2' => array( 'url' => get_template_directory_uri() . '/assets/images/archive2.png', 'label' => esc_html__( 'Single Column List Alternate', 'blogbyte' ), ), 'archive_style_3' => array( 'url' => get_template_directory_uri() . '/assets/images/archive3.png', 'label' => esc_html__( 'Full Column', 'blogbyte' ), ), 'archive_style_4' => array( 'url' => get_template_directory_uri() . '/assets/images/archive4.png', 'label' => esc_html__( 'Full Column', 'blogbyte' ), ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_single_layouts' ) ) : /** * Returns Single Post layout options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_single_layouts() { $options = apply_filters( 'blogbyte_single_layouts', array( 'single_style_1' => esc_html__( 'Style 1', 'blogbyte' ), 'single_style_2' => esc_html__( 'Style 2', 'blogbyte' ), 'single_style_3' => esc_html__( 'Style 3', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_single_navigation_styles' ) ) : /** * Returns Single Post Navigation Style options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_single_navigation_styles() { $options = apply_filters( 'blogbyte_single_navigation_styles', array( 'none' => esc_html__( 'None', 'blogbyte' ), 'style_1' => esc_html__( 'Text Only', 'blogbyte' ), 'style_2' => esc_html__( 'Text + Image', 'blogbyte' ), 'style_3' => esc_html__( 'Image + Text Overlay', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_category_color_display' ) ) : /** * Returns category color display options * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_category_color_display() { $options = apply_filters( 'blogbyte_category_color_display', array( 'none' => __( 'None', 'blogbyte' ), 'as_color' => __( 'As Color', 'blogbyte' ), 'as_bg' => __( 'As Background Color', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_category_styles' ) ) : /** * Returns category styles options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_category_styles() { $options = apply_filters( 'blogbyte_category_styles', array( 'style_1' => __( 'Style 1', 'blogbyte' ), 'style_2' => __( 'Style 2', 'blogbyte' ), 'style_3' => __( 'Style 3', 'blogbyte' ), 'style_4' => __( 'Style 4', 'blogbyte' ), 'style_5' => __( 'Style 5', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_tag_styles' ) ) : /** * Returns tag styles options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_tag_styles() { $options = apply_filters( 'blogbyte_tag_styles', array( 'style_1' => __( 'Style 1', 'blogbyte' ), 'style_2' => __( 'Style 2', 'blogbyte' ), 'style_3' => __( 'Style 3', 'blogbyte' ), 'style_4' => __( 'Style 4', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_read_more_styles' ) ) : /** * Returns read more styles options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_read_more_styles() { $options = apply_filters( 'blogbyte_read_more_styles', array( 'style_1' => __( 'Style 1', 'blogbyte' ), 'style_2' => __( 'Style 2', 'blogbyte' ), 'style_3' => __( 'Style 3', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_read_more_icons' ) ) : /** * Returns read more icons options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_read_more_icons() { $options = apply_filters( 'blogbyte_read_more_icons', array( '' => array( 'url' => get_template_directory_uri() . '/assets/images/circle-backslash.svg', 'label' => esc_html__( 'None', 'blogbyte' ), ), 'arrow-bar-right' => array( 'url' => get_template_directory_uri() . '/assets/images/arrow-bar-right.svg', 'label' => esc_html__( 'Arrow Bar Right', 'blogbyte' ), ), 'arrow-right' => array( 'url' => get_template_directory_uri() . '/assets/images/arrow-right.svg', 'label' => esc_html__( 'Arrow Right', 'blogbyte' ), ), 'arrow-right-circle' => array( 'url' => get_template_directory_uri() . '/assets/images/arrow-right-circle.svg', 'label' => esc_html__( 'Arrow Right Circle', 'blogbyte' ), ), 'arrow-right-circle-fill' => array( 'url' => get_template_directory_uri() . '/assets/images/arrow-right-circle-fill.svg', 'label' => esc_html__( 'Arrow Right Circle Fill', 'blogbyte' ), ), 'arrow-right-short' => array( 'url' => get_template_directory_uri() . '/assets/images/arrow-right-short.svg', 'label' => esc_html__( 'Arrow Right Short', 'blogbyte' ), ), 'bell' => array( 'url' => get_template_directory_uri() . '/assets/images/bell.svg', 'label' => esc_html__( 'Bell', 'blogbyte' ), ), 'bell-fill' => array( 'url' => get_template_directory_uri() . '/assets/images/bell-fill.svg', 'label' => esc_html__( 'Bell Fill', 'blogbyte' ), ), 'bookmark' => array( 'url' => get_template_directory_uri() . '/assets/images/bookmark.svg', 'label' => esc_html__( 'Bookmark', 'blogbyte' ), ), 'bookmark-fill' => array( 'url' => get_template_directory_uri() . '/assets/images/bookmark-fill.svg', 'label' => esc_html__( 'Bookmark Fill', 'blogbyte' ), ), 'chevron-right' => array( 'url' => get_template_directory_uri() . '/assets/images/chevron-right.svg', 'label' => esc_html__( 'Chevron Right', 'blogbyte' ), ), 'chevron-double-right' => array( 'url' => get_template_directory_uri() . '/assets/images/chevron-double-right.svg', 'label' => esc_html__( 'Chevron Double Right', 'blogbyte' ), ), 'caret-right' => array( 'url' => get_template_directory_uri() . '/assets/images/caret-right.svg', 'label' => esc_html__( 'Caret Right', 'blogbyte' ), ), 'caret-right-fill' => array( 'url' => get_template_directory_uri() . '/assets/images/caret-right-fill.svg', 'label' => esc_html__( 'Caret Right Fill', 'blogbyte' ), ), 'envelope' => array( 'url' => get_template_directory_uri() . '/assets/images/envelope.svg', 'label' => esc_html__( 'Envelope', 'blogbyte' ), ), 'envelope-fill' => array( 'url' => get_template_directory_uri() . '/assets/images/envelope-fill.svg', 'label' => esc_html__( 'Envelope Fill', 'blogbyte' ), ), 'plus' => array( 'url' => get_template_directory_uri() . '/assets/images/plus.svg', 'label' => esc_html__( 'Plus', 'blogbyte' ), ), 'send' => array( 'url' => get_template_directory_uri() . '/assets/images/send.svg', 'label' => esc_html__( 'send', 'blogbyte' ), ), 'send-fill' => array( 'url' => get_template_directory_uri() . '/assets/images/send-fill.svg', 'label' => esc_html__( 'Send Fill', 'blogbyte' ), ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_read_more_icons_list' ) ) : /** * Returns read more icons for select. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_read_more_icons_list() { $list = array(); $options = blogbyte_get_read_more_icons(); foreach ( $options as $key => $value ) { $list[ $key ] = $value['label']; } return $list; } endif; if ( ! function_exists( 'blogbyte_get_social_links_styles' ) ) : /** * Returns social links styles options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_social_links_styles() { $options = apply_filters( 'blogbyte_social_links_styles', array( 'style_1' => __( 'Style 1', 'blogbyte' ), 'style_2' => __( 'Style 2', 'blogbyte' ), 'style_3' => __( 'Style 3', 'blogbyte' ), 'style_4' => __( 'Style 4', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_widget_styles_arr' ) ) : /** * Returns widget styles options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_widget_styles_arr() { $options = apply_filters( 'blogbyte_widget_styles_arr', array( 'style_1' => __( 'Plain', 'blogbyte' ), 'style_2' => __( 'Bordered', 'blogbyte' ), 'style_3' => __( 'Border Below', 'blogbyte' ), 'style_4' => __( 'Box Shadow', 'blogbyte' ), 'style_5' => __( 'Card Background', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_title_styles' ) ) : /** * Returns title styles options. * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_title_styles() { $options = apply_filters( 'blogbyte_title_styles', array( 'style_1' => __( 'Style 1', 'blogbyte' ), 'style_2' => __( 'Style 2', 'blogbyte' ), 'style_3' => __( 'Style 3', 'blogbyte' ), 'style_4' => __( 'Style 4', 'blogbyte' ), 'style_5' => __( 'Style 5', 'blogbyte' ), 'style_6' => __( 'Style 6', 'blogbyte' ), 'style_7' => __( 'Style 7', 'blogbyte' ), 'style_8' => __( 'Style 8', 'blogbyte' ), 'style_9' => __( 'Style 9', 'blogbyte' ), 'style_10' => __( 'Style 10', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_title_alignments' ) ) : /** * Returns title Alignments * * @since 1.0.0 * * @return array Options array. */ function blogbyte_get_title_alignments() { $options = apply_filters( 'blogbyte_title_alignments', array( 'left' => __( 'Left', 'blogbyte' ), 'center' => __( 'Center', 'blogbyte' ), 'right' => __( 'Right', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_sidebar_widget_style' ) ) : /** * Returns sidebar widget style * * @since 1.0.0 * * @return string style */ function blogbyte_get_sidebar_widget_style() { if ( is_front_page() ) { $widget_style = get_theme_mod( 'home_sidebar_widget_style', 'style_3' ); } else { $widget_style = get_theme_mod( 'sidebar_widget_style', 'style_3' ); } return 'uf-wa-widget-' . $widget_style; } endif; if ( ! function_exists( 'blogbyte_get_sidebar_heading_style' ) ) : /** * Returns sidebar widget heading style * * @since 1.0.0 * * @return string heading_style */ function blogbyte_get_sidebar_heading_style() { if ( is_front_page() ) { $heading_style = get_theme_mod( 'home_sidebar_widget_heading_style', 'style_9' ); } else { $heading_style = get_theme_mod( 'sidebar_widget_heading_style', 'style_9' ); } return 'saga-title-style-' . $heading_style; } endif; if ( ! function_exists( 'blogbyte_get_sidebar_heading_align' ) ) : /** * Returns sidebar widget heading align * * @since 1.0.0 * * @return string heading_align */ function blogbyte_get_sidebar_heading_align() { if ( is_front_page() ) { $heading_align = get_theme_mod( 'home_sidebar_widget_heading_align', 'left' ); } else { $heading_align = get_theme_mod( 'sidebar_widget_heading_align', 'left' ); } return 'saga-title-align-' . $heading_align; } endif; if ( ! function_exists( 'blogbyte_in_multi_array' ) ) : /** * Returns true/false if the key exists in array * * @since 1.0.0 * * @param string $needle * @param array $haystack * * @return boolean Key exists/not */ function blogbyte_in_multi_array( $needle, $haystack ) { if ( array_key_exists( $needle, $haystack ) or in_array( $needle, $haystack ) ) { return true; } else { $return = false; foreach ( array_values( $haystack ) as $value ) { if ( is_array( $value ) and ! $return ) { $return = blogbyte_in_multi_array( $needle, $value ); } } return $return; } } endif; if ( ! function_exists( 'blogbyte_hex2rbga' ) ) : /**Convert hex to rbga * * @since 1.0.0 * * @param $color string Hex color * @param $opacity int Opacity */ function blogbyte_hex2rbga( $color, $opacity = false ) { $default = 'rgb(0,0,0)'; // Return default if no color provided. if ( empty( $color ) ) { return $default; } // Sanitize $color if "#" is provided. if ( $color[0] == '#' ) { $color = substr( $color, 1 ); } // Check if color has 6 or 3 characters and get values. if ( strlen( $color ) == 6 ) { $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] ); } elseif ( strlen( $color ) == 3 ) { $hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] ); } else { return $default; } // Convert hexadec to rgb. $rgb = array_map( 'hexdec', $hex ); // Check if opacity is set(rgba or rgb). if ( $opacity ) { if ( abs( $opacity ) > 1 ) { $opacity = 1.0; } $output = 'rgba(' . implode( ',', $rgb ) . ',' . $opacity . ')'; } else { $output = 'rgb(' . implode( ',', $rgb ) . ')'; } // Return rgb(a) color string. return $output; } endif; if ( ! function_exists( 'blogbyte_estimated_read_time' ) ) : /** * Estimated reading time in minutes * * @param $content * @param $with_gutenberg * * @return int estimated time in minutes */ function blogbyte_estimated_read_time( $content = '', $with_gutenberg = false ) { // In case if content is build with gutenberg parse blocks. if ( $with_gutenberg ) { $blocks = parse_blocks( $content ); $contentHtml = ''; foreach ( $blocks as $block ) { $contentHtml .= render_block( $block ); } $content = $contentHtml; } // Remove HTML tags from string. $content = wp_strip_all_tags( $content ); // When content is empty return 0. if ( ! $content ) { return 0; } // Count words containing string. $words_count = str_word_count( $content ); // Words per minute. $words_per_minute = 200; // Calculate time for read all words and round. $minutes = ceil( $words_count / $words_per_minute ); return $minutes; } endif; if ( ! function_exists( 'blogbyte_print_first_instance_of_block' ) ) : /** Print the first instance of a block in the content, and then break away. * * @param string $block_name The full block type name, or a partial match. * Example: `core/image`, `core-embed/*`. * @param string|null $content The content to search in. Use null for get_the_content(). * @param int $instances How many instances of the block will be printed (max). Default 1. * @return bool Returns true if a block was located & printed, otherwise false. */ function blogbyte_print_first_instance_of_block( $block_name, $content = null, $instances = 1 ) { $instances_count = 0; $blocks_content = ''; if ( ! $content ) { $content = get_the_content(); } // Parse blocks in the content. $blocks = parse_blocks( $content ); // Loop blocks. foreach ( $blocks as $block ) { // Sanity check. if ( ! isset( $block['blockName'] ) ) { continue; } // Check if this the block matches the $block_name. $is_matching_block = false; // If the block ends with *, try to match the first portion. if ( '*' === $block_name[-1] ) { $is_matching_block = 0 === strpos( $block['blockName'], rtrim( $block_name, '*' ) ); } else { $is_matching_block = $block_name === $block['blockName']; } if ( $is_matching_block ) { // Increment count. ++$instances_count; // Add the block HTML. $blocks_content .= render_block( $block ); // Break the loop if the $instances count was reached. if ( $instances_count >= $instances ) { break; } } } if ( $blocks_content ) { /** This filter is documented in wp-includes/post-template.php */ echo apply_filters( 'the_content', $blocks_content ); // phpcs:ignore WordPress.Security.EscapeOutput return true; } return false; } endif; if ( ! function_exists( 'blogbyte_excerpt_length' ) ) { /** * Change Excerpt Length * * @param string $length of the excerpt. */ function blogbyte_excerpt_length( $length ) { if ( is_admin() && ! wp_doing_ajax() ) { return $length; } $length = get_theme_mod( 'max_excerpt_length', 55 ); return $length; } } add_filter( 'excerpt_length', 'blogbyte_excerpt_length' ); if ( ! function_exists( 'blogbyte_more' ) ) { /** * Change Excerpt Suffix * * @param string $more suffix for the excerpt. */ function blogbyte_excerpt_more( $more ) { return '…'; } } add_filter( 'excerpt_more', 'blogbyte_excerpt_more' ); if ( ! function_exists( 'blogbyte_archive_title_prefix_wrapper' ) ) : /** * Wrap prefix * * @return string Prefix */ function blogbyte_archive_title_prefix_wrapper( $prefix ) { return '' . $prefix . ''; } endif; // add_filter( 'get_the_archive_title_prefix', 'blogbyte_archive_title_prefix_wrapper' ); if ( ! function_exists( 'blogbyte_get_localized_variables' ) ) { /** * Get array of localized variables * * @return array Array of localized vairables */ function blogbyte_get_localized_variables() { $args = array(); /*For Ajax Load Posts*/ $args['nonce'] = wp_create_nonce( 'blogbyte-load-more-nonce' ); $args['ajaxurl'] = admin_url( 'admin-ajax.php' ); if ( is_front_page() ) { $args['post_type'] = 'post'; } /*Support for custom post types*/ if ( is_post_type_archive() ) { $args['post_type'] = get_queried_object()->name; } /*Support for categories and taxonomies*/ if ( is_category() || is_tag() || is_tax() ) { $args['cat'] = get_queried_object()->slug; $args['taxonomy'] = get_queried_object()->taxonomy; /*Get the associated post type for custom taxonomy*/ if ( is_tax() ) { global $wp_taxonomies; $tax_object = isset( $wp_taxonomies[ $args['taxonomy'] ] ) ? $wp_taxonomies[ $args['taxonomy'] ]->object_type : array(); $args['post_type'] = array_pop( $tax_object ); } } /*Support for search*/ if ( is_search() ) { $args['search'] = get_search_query(); } /*Support for author*/ if ( is_author() ) { $args['author'] = get_the_author_meta( 'user_nicename' ); } /*Support for date archive*/ if ( is_date() ) { $args['year'] = get_query_var( 'year' ); $args['month'] = get_query_var( 'monthnum' ); $args['day'] = get_query_var( 'day' ); } global $wp_query; $arggs['nonce'] = wp_create_nonce( 'blogbyte-load-more-nonce' ); $arggs['ajaxurl'] = admin_url( 'admin-ajax.php' ); $arggs['posts'] = json_encode( $wp_query->query_vars ); $arggs['current_page'] = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; $arggs['max_page'] = $wp_query->max_num_pages; return $args; } } if ( ! function_exists( 'blogbyte_post_image' ) ) : /** * Display post image. * * @param string $image_size Image Size to fetch * @param boolean $bg Image in background * * @since 1.1.0 */ function blogbyte_post_image( $image_size = 'thumbnail', $bg = false ) { $class = ''; if ( true == $bg ) { $class = 'blogbyte-bg-image'; } ?>
the_title_attribute( array( 'echo' => false, ) ), ) ); ?>
__( '— No Limit —', 'blogbyte' ), 'limit-lines-1' => __( '1 Line', 'blogbyte' ), 'limit-lines-2' => __( '2 Lines', 'blogbyte' ), 'limit-lines-3' => __( '3 Lines', 'blogbyte' ), 'limit-lines-4' => __( '4 Lines', 'blogbyte' ), 'limit-lines-5' => __( '5 Lines', 'blogbyte' ), ) ); return $options; } endif; if ( ! function_exists( 'blogbyte_get_archive_excerpt' ) ) : /** * Get archive excerpt * * @since 1.0.0 * * @return string Page ID. */ function blogbyte_get_archive_excerpt() { $excerpt_length = get_theme_mod( 'excerpt_length', 48 ); return wp_trim_words( get_the_excerpt(), $excerpt_length, '…' ); } endif; if ( ! function_exists( 'blogbyte_the_archive_excerpt' ) ) : /** * Print archive excerpt * * @since 1.0.0 * * @return string Page ID. */ function blogbyte_the_archive_excerpt() { echo wpautop( wp_kses_post( blogbyte_get_archive_excerpt() ) ); } endif; if ( ! function_exists( 'blogbyte_redirect_random_post' ) ) : /** * Go to a random post. * * @since 1.0.0 */ function blogbyte_redirect_random_post() { if ( wp_doing_ajax() ) { return; } if ( isset( $_GET['random-post'] ) ) { $args = apply_filters( 'blogbyte_redirect_random_post_args', array( 'posts_per_page' => 1, 'orderby' => 'rand', 'fields' => 'ids', 'no_found_rows' => true, 'ignore_sticky_posts' => true, ) ); $random_post = new WP_Query( $args ); if ( $random_post->have_posts() ) : while ( $random_post->have_posts() ) : $random_post->the_post(); wp_redirect( get_permalink() ); exit; endwhile; wp_reset_postdata(); endif; } } endif; add_action( 'init', 'blogbyte_redirect_random_post' ); if ( ! function_exists( 'blogbyte_random_post' ) ) : /** * Displays a random post link with an icon. * * @since 1.0.0 */ function blogbyte_random_post() { ?>