implode( '&family=', $font_families ), 'display' => 'swap', ), 'https://fonts.googleapis.com/css2' ); require_once get_theme_file_path( 'core/wptt-webfont-loader.php' ); return wptt_get_webfont_url( esc_url_raw( $fonts_url ) ); } // Enqueue scripts and styles. add_action( 'wp_enqueue_scripts', 'abiz_theme_scripts' ); function abiz_theme_scripts() { // Styles wp_enqueue_style( 'bootstrap-min', get_template_directory_uri().'/assets/css/bootstrap.min.css' ); wp_enqueue_style( 'owl-carousel-min', get_template_directory_uri().'/assets/css/owl.carousel.min.css' ); wp_enqueue_style( 'all-css', get_template_directory_uri().'/assets/css/all.min.css' ); wp_enqueue_style( 'animate', get_template_directory_uri().'/assets/css/animate.min.css' ); wp_enqueue_style( 'abiz-main', get_template_directory_uri() . '/assets/css/main.css' ); wp_enqueue_style( 'abiz-media-query', get_template_directory_uri() . '/assets/css/responsive.css' ); wp_enqueue_style( 'abiz-fonts', abiz_site_get_google_font() , array() , null ); wp_enqueue_style( 'abiz-style', get_stylesheet_uri() ); $output_style = ''; // Page Header $page_header_img_opacity = get_theme_mod('page_header_img_opacity', abiz_get_default_option( 'page_header_img_opacity' )); $page_header_bg_color = get_theme_mod('page_header_bg_color', abiz_get_default_option( 'page_header_bg_color' )); if (has_header_image()) { $output_style .= ".breadcrumb-area:after { background-color: " . esc_attr($page_header_bg_color) . "; opacity: " . esc_attr($page_header_img_opacity) . "; }\n"; } // Logo Style $logo_size = get_theme_mod('logo_size', abiz_get_default_option( 'logo_size' )); $site_ttl_font_size = get_theme_mod('site_ttl_font_size', abiz_get_default_option( 'site_ttl_font_size' )); $site_desc_font_size = get_theme_mod('site_desc_font_size', abiz_get_default_option( 'site_desc_font_size' )); $output_style .= ".logo img, .mobile-logo img {max-width: " . esc_attr($logo_size) . "px;}\n"; $output_style .= ".site-title {font-size: " . esc_attr($site_ttl_font_size) . "px;}\n"; $output_style .= ".site-description {font-size: " . esc_attr($site_desc_font_size) . "px;}\n"; // Typography Body $abiz_body_font_size = get_theme_mod('abiz_body_font_size',abiz_get_default_option( 'abiz_body_font_size' )); $abiz_body_font_weight = get_theme_mod('abiz_body_font_weight','inherit'); $abiz_body_text_transform = get_theme_mod('abiz_body_text_transform','inherit'); $abiz_body_font_style = get_theme_mod('abiz_body_font_style','inherit'); $abiz_body_txt_decoration = get_theme_mod('abiz_body_txt_decoration','none'); $output_style .=" body{ font-size: " .esc_attr($abiz_body_font_size). "px; font-weight: " .esc_attr($abiz_body_font_weight). "; text-transform: " .esc_attr($abiz_body_text_transform). "; font-style: " .esc_attr($abiz_body_font_style). "; text-decoration: " .esc_attr($abiz_body_txt_decoration). "; }\n"; wp_add_inline_style( 'abiz-style', $output_style ); // Scripts wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery'), false, true ); wp_enqueue_script( 'owl-carousel', get_template_directory_uri() . '/assets/js/owl.carousel.min.js', array('jquery'), false, true ); wp_enqueue_script( 'wow-min', get_template_directory_uri() . '/assets/js/wow.min.js', array('jquery'), false, false, true ); wp_enqueue_script( 'marquee', get_template_directory_uri() . '/assets/js/jquery.marquee.js', array( 'jquery' ), '1.0', true ); wp_enqueue_script( 'abiz-custom-js', get_template_directory_uri() . '/assets/js/custom.js', array('jquery'), false, true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'admin_enqueue_scripts', 'abiz_theme_admin_scripts' ); function abiz_theme_admin_scripts() { wp_enqueue_style( 'abiz-admin-style', ABIZ_THEME_CORE_URI . '/customizer/assets/css/admin.css' ); wp_enqueue_script( 'abiz-admin-script', ABIZ_THEME_CORE_URI . '/customizer/assets/js/admin-script.js', array( 'jquery' ), '', true ); wp_localize_script( 'abiz-admin-script', 'abiz_ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) ); } // Register widget area add_action( 'widgets_init', 'abiz_widgets_init' ); function abiz_widgets_init() { // Sidebar Widget register_sidebar( array( 'name' => __( 'Main Sidebar Widget', 'abiz' ), 'id' => 'sidebar-primary', 'description' => __( 'Main Sidebar Widget', 'abiz' ), 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); // Footer Sidebar 1 register_sidebar( array( 'name' => __( 'Footer Sidebar 1', 'abiz' ), 'id' => 'footer-sidebar-1', 'description' => __( 'The Footer Widget Area 1', 'abiz' ), 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); // Footer Sidebar 2 register_sidebar( array( 'name' => __( 'Footer Sidebar 2', 'abiz' ), 'id' => 'footer-sidebar-2', 'description' => __( 'The Footer Widget Area 2', 'abiz' ), 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); // Footer Sidebar 3 register_sidebar( array( 'name' => __( 'Footer Sidebar 3', 'abiz' ), 'id' => 'footer-sidebar-3', 'description' => __( 'The Footer Widget Area 3', 'abiz' ), 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); // Footer Sidebar 4 register_sidebar( array( 'name' => __( 'Footer Sidebar 4', 'abiz' ), 'id' => 'footer-sidebar-4', 'description' => __( 'The Footer Widget Area 4', 'abiz' ), 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); // WooCommerce Sidebar if ( class_exists( 'WooCommerce' ) ) { register_sidebar( array( 'name' => __( 'WooCommerce Sidebar', 'abiz' ), 'id' => 'sidebar-woocommerce', 'description' => __( 'This Widget area for WooCommerce Widget', 'abiz' ), 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); } } // Function that returns if the menu is sticky if (!function_exists('abiz_site_header_sticky')): function abiz_site_header_sticky() { $enable_hdr_sticky = get_theme_mod('enable_hdr_sticky', abiz_get_default_option( 'enable_hdr_sticky' )); if ($enable_hdr_sticky == '1'): return 'is-sticky-on'; endif; } endif; // Abiz Section Header if (!function_exists('abiz_section_header')): function abiz_section_header($title, $subtitle, $description) { if (!empty($title) || !empty($subtitle) || !empty($description)): ?>

cart->cart_contents_count; ?> ' . esc_html_e('Home','abiz') . ' ' . ' / '; if (is_category()) { $thisCat = get_category(get_query_var('cat') , false); if ($thisCat->parent != 0) echo get_category_parents($thisCat->parent, true, ' ' . ' '); echo '
  • ' . esc_html__('Archive by category', 'abiz') . ' "' . esc_html(single_cat_title('', false)) . '"' . '
  • '; } elseif (is_search()) { echo '
  • ' . esc_html__('Search results for ', 'abiz') . ' "' . esc_html(get_search_query()) . '"' . '
  • '; } elseif (is_day()) { echo '' . esc_html(get_the_time('Y')) . ' ' . ' / '; echo '' . esc_html(get_the_time('F')) . ' ' . ' / '; echo '
  • ' . esc_html(get_the_time('d')) . '
  • '; } elseif (is_month()) { echo '' . esc_html(get_the_time('Y')) . '  / '; echo '
  • ' . esc_html(get_the_time('F')) . '
  • '; } elseif (is_year()) { echo '
  • ' . esc_html(get_the_time('Y')) . '
  • '; } elseif (is_single() && !is_attachment()) { if (get_post_type() != 'post') { if (class_exists('WooCommerce')) { echo '   ' . '
  • ' . wp_kses_post(get_the_title()) . '
  • '; } else { $post_type = get_post_type_object(get_post_type()); $slug = $post_type->rewrite; echo '' . $post_type ->labels->singular_name . ''; echo '  / ' . '
  • ' . wp_kses_post(get_the_title()) . '
  • '; } } else { $cat = get_the_category(); $cat = $cat[0]; $cats = get_category_parents($cat, true, '  / '); $cats = preg_replace("#^(.+)\s\s$#", "$1", $cats); echo $cats; echo '
  • ' . esc_html(get_the_title()) . '
  • '; } } elseif (!is_single() && !is_page() && get_post_type() != 'post' && !is_404()) { if (class_exists('WooCommerce')) { if (is_shop()) { $thisshop = woocommerce_page_title(); } } else { $post_type = get_post_type_object(get_post_type()); echo '
  • ' . $post_type ->labels->singular_name . '
  • '; } } elseif (!is_single() && !is_page() && get_post_type() != 'post' && !is_404()) { $post_type = get_post_type_object(get_post_type()); echo '
  • ' . $post_type ->labels->singular_name . '
  • '; } elseif (is_attachment()) { $parent = get_post($post->post_parent); $cat = get_the_category($parent->ID); if (!empty($cat)) { $cat = $cat[0]; echo get_category_parents($cat, true, '  / '); } echo '' . $parent->post_title . ''; echo '
  • ' . esc_html(get_the_title()) . '
  • '; } elseif (is_page() && !$post->post_parent) { echo '
  • ' . esc_html(get_the_title()) . '
  • '; } elseif (is_page() && $post->post_parent) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ($parent_id) { $page = get_page($parent_id); $breadcrumbs[] = '' . esc_html(get_the_title($page->ID)) . '' . ' / '; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse($breadcrumbs); for ($i = 0;$i < count($breadcrumbs);$i++) { echo $breadcrumbs[$i]; if ($i != count($breadcrumbs) - 1) echo ' / '; } echo '
  • ' . esc_html(get_the_title()) . '
  • '; } elseif (is_tag()) { echo '
  • ' . esc_html__('Posts tagged ', 'abiz') . ' "' . esc_html(single_tag_title('', false)) . '"' . '
  • '; } elseif (is_author()) { global $author; $userdata = get_userdata($author); echo '
  • ' . esc_html__('Articles posted by ', 'abiz') . '' . $userdata->display_name . '
  • '; } elseif (is_404()) { echo '
  • ' . esc_html__('Error 404 ', 'abiz') . '
  • '; } if (get_query_var('paged')) { if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()) echo ''; echo ' ( ' . esc_html__('Page', 'abiz') . '' . esc_html(get_query_var('paged')) . ' )'; if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()) echo ''; } echo ''; } // Excerpt Length function abiz_blog_excerpt_length( $length ) { $blog_excerpt_length = get_theme_mod( 'blog_excerpt_length', abiz_get_default_option( 'blog_excerpt_length' )); if( $blog_excerpt_length == 1000 ) { return 9999; } return esc_html( $blog_excerpt_length ); } add_filter( 'excerpt_length', 'abiz_blog_excerpt_length', 999 ); // Excerpt Text function abiz_blog_excerpt_after_text( $more ) { $blog_excerpt_after_text = get_theme_mod( 'blog_excerpt_after_text', abiz_get_default_option( 'blog_excerpt_after_text' )); return $blog_excerpt_after_text; } add_filter( 'excerpt_more', 'abiz_blog_excerpt_after_text' ); // Blog Excerpt Button if ( ! function_exists( 'abiz_blog_excerpt_button' ) ) : function abiz_blog_excerpt_button() { $enable_blog_excerpt_btn = get_theme_mod( 'enable_blog_excerpt_btn', abiz_get_default_option( 'enable_blog_excerpt_btn' )); $blog_excerpt_btn_label = get_theme_mod( 'blog_excerpt_btn_label', abiz_get_default_option( 'blog_excerpt_btn_label' )); if ( $enable_blog_excerpt_btn == '1' ): ?> esc_html__('fab fa-facebook', 'abiz') , 'link' => esc_html__('#', 'abiz') , 'id' => 'customizer_repeater_header_social_001', ) , array( 'icon_value' => esc_html__('fab fa-x-twitter', 'abiz') , 'link' => esc_html__('#', 'abiz') , 'id' => 'customizer_repeater_header_social_003', ) , array( 'icon_value' => esc_html__('fab fa-instagram', 'abiz') , 'link' => esc_html__('#', 'abiz') , 'id' => 'customizer_repeater_header_social_004', ) , array( 'icon_value' => esc_html__('fab fa-tiktok', 'abiz') , 'link' => esc_html__('#', 'abiz') , 'id' => 'customizer_repeater_header_social_005', ) , ))); } /* * * Footer Top Default */ function abiz_footer_top_default() { return apply_filters('abiz_footer_top_default', json_encode(array( array( 'icon_value' => 'fas fa-envelope', 'title' => esc_html__('Email Us 24/7', 'abiz') , 'subtitle' => esc_html__('info@example.com', 'abiz') , 'link' => 'mailto:info@example.com', 'id' => 'customizer_repeater_footer_top_001' ) , array( 'icon_value' => 'fas fa-question', 'title' => esc_html__('Have Questions?', 'abiz') , 'subtitle' => esc_html__('Contact Us', 'abiz') , 'id' => 'customizer_repeater_footer_top_002', ) , array( 'icon_value' => 'fas fa-phone', 'title' => esc_html__('Call Us 24/7', 'abiz') , 'subtitle' => esc_html__('+123 456 7890', 'abiz') , 'link' => 'tell:+123 456 7890', 'id' => 'customizer_repeater_footer_top_003', ) , array( 'icon_value' => 'far fa-clock', 'title' => esc_html__('Opening Hours', 'abiz') , 'subtitle' => esc_html__('Mon-Sat: 10- 6 Pm', 'abiz') , 'id' => 'customizer_repeater_footer_top_004', ) , ))); } /******************************************************************************* * Get Started Notice *******************************************************************************/ add_action( 'wp_ajax_abiz_dismissed_notice_handler', 'abiz_ajax_notice_handler' ); /** * AJAX handler to store the state of dismissible notices. */ function abiz_ajax_notice_handler() { if ( isset( $_POST['type'] ) ) { // Pick up the notice "type" - passed via jQuery (the "data-notice" attribute on the notice) $type = sanitize_text_field( wp_unslash( $_POST['type'] ) ); // Store it in the options table update_option( 'dismissed-' . $type, TRUE ); } } function abiz_deprecated_hook_admin_notice() { // Check if it's been dismissed... if ( ! get_option('dismissed-get_started', FALSE ) ) { // Added the class "notice-get-started-class" so jQuery pick it up and pass via AJAX, // and added "data-notice" attribute in order to track multiple / different notices // multiple dismissible notice states ?>
    <?php esc_attr_e( 'Theme Screenshot', 'abiz' ); ?>

    '. wp_get_theme()->get('Name'). '' ); ?>

    Daddy Plus plugin for taking full advantage of all the features this theme has to offer.', 'abiz')) ?>

    '. wp_get_theme()->get('Name'). '' ); ?> ', '', '' ); ?>
    sanitize_key( wp_unslash( 'daddy-plus' ) ), 'fields' => array( 'sections' => false, ), ) ); $skin = new WP_Ajax_Upgrader_Skin(); $upgrader = new Plugin_Upgrader( $skin ); $result = $upgrader->install( $api->download_link ); } // Activate plugin. if ( current_user_can( 'activate_plugin' ) ) { $result = activate_plugin( 'daddy-plus/daddy-plus.php' ); } }