secondary_menu)) { return true; } return false; } endif; if (!function_exists('cosmoswp_primary_menu_if_custom_menu')) : /** * Check if primary menu custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for primary menu selector*/ function cosmoswp_primary_menu_if_custom_menu() { if ('custom' == cosmoswp_get_theme_options(cosmoswp_header_builder()->primary_menu)) { return true; } return false; } endif; if (!function_exists('cosmoswp_footer_menu_typography_if_custom_selected')) : /** * Check if footer menu Typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for Sticky footer Typography menu*/ function cosmoswp_footer_menu_typography_if_custom_selected() { if ('custom' == cosmoswp_get_theme_options('footer-menu-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_site_title_typography_if_custom')) : /** * Check if site title typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for site title typography options*/ function cosmoswp_site_title_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('site-identity-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_secondary_menu_typography_if_custom')) : /** * Check if secondary menu typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for sconday menu typography options*/ function cosmoswp_secondary_menu_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('secondary-menu-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_secondary_submenu_typography_if_custom')) : /** * Check if secondary submenu item typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for sconday submenu item typography options*/ function cosmoswp_secondary_submenu_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('secondary-menu-submenu-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_primary_menu_typography_if_custom')) : /** * Check if primary menu typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for secondary menu typography options*/ function cosmoswp_primary_menu_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('primary-menu-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_primary_submenu_typography_if_custom')) : /** * Check if primary submenu item typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for primary submenu item typography options*/ function cosmoswp_primary_submenu_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('primary-menu-submenu-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_button_one_typography_if_custom')) : /** * Check if button one typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for button one typography options*/ function cosmoswp_button_one_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('button-one-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_site_button_typography_if_custom')) : /** * Check if button one typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for typography options*/ function cosmoswp_site_button_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('site-button-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_copyright_typography_if_custom')) : /** * Check if copyright typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for copyright typography options*/ function cosmoswp_copyright_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('footer-copyright-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_contact_info_title_typography_if_custom')) : /** * Check if contact-info title typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for contact-info typography options*/ function cosmoswp_contact_info_title_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('contact-info-title-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_contact_info_subtitle_typography_if_custom')) : /** * Check if contact-info subtitle typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for contact-info typography options*/ function cosmoswp_contact_info_subtitle_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('contact-info-subtitle-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_html_typography_if_custom')) : /** * Check if html1 typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for html1 typography options*/ function cosmoswp_html_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('html-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_footer_html_typography_if_custom')) : /** * Check if footer html typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for footer html typography options*/ function cosmoswp_footer_html_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('footer-html-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_validate_category_not_empty')) { /** * Validate Category is not empty * * @since cosmoswp 1.0.0 * * @param $validity * @param $value * @return mixed * */ function cosmoswp_validate_category_not_empty($validity, $value) { $terms = get_terms( array( 'taxonomy' => 'category', 'hide_empty' => true, ) ); if (($value == 'from-category') && (empty($terms) || is_wp_error($terms))) { $validity->add('required', esc_html__('Category is empty', 'cosmoswp')); } return $validity; } } if (!function_exists('cosmoswp_global_widget_title_typography_if_custom')) : /** * Check if widget title typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for widget title typography options*/ function cosmoswp_global_widget_title_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('global-widget-title-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_global_widget_content_typography_if_custom')) : /** * Check if widget content typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for widget content typography options*/ function cosmoswp_global_widget_content_typography_if_custom() { if ('custom' == cosmoswp_get_theme_options('global-widget-content-typography-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_footer_display_style_fixed')) : /** * Check if footer display style fixed * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for footer display style*/ function cosmoswp_footer_display_style_fixed() { if ('fixed-footer' == cosmoswp_get_theme_options('footer-display-style')) { return true; } return false; } endif; if (!function_exists('cosmoswp_button_one_enable_icon')) : /** * Enable Button one icon * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for Icon properties style*/ function cosmoswp_button_one_enable_icon() { if ( cosmoswp_get_theme_options('button-one-enable-icon')) { return true; } return false; } endif; if (!function_exists('cosmoswp_banner_section_display_enable')) : /** * Enable Banner in main content area * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for banner section in main content area */ function cosmoswp_banner_section_display_enable() { $banner_image_display = cosmoswp_get_theme_options('banner-section-display'); if ('hide' != $banner_image_display && !empty($banner_image_display)) { return true; } return false; } endif; if (!function_exists('cosmoswp_single_custom_banner_title_display_enable')) : /** * Check banner enabled & Single custom title * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for single banner custom title in main content area */ function cosmoswp_single_custom_banner_title_display_enable() { $banner_image_display = cosmoswp_get_theme_options('banner-section-display'); $single_title_options = cosmoswp_get_theme_options('single-banner-section-title'); if ('hide' != $banner_image_display && $single_title_options == 'custom-title') { return true; } return false; } endif; if (!function_exists('cosmoswp_single_custom_banner_title_tag_active')) : /** * Check banner enabled & Single custom title * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for single banner custom title in main content area */ function cosmoswp_single_custom_banner_title_tag_active() { $banner_image_display = cosmoswp_get_theme_options('banner-section-display'); $single_title_options = cosmoswp_get_theme_options('single-banner-section-title'); if ('hide' != $banner_image_display && ($single_title_options == 'custom-title' || $single_title_options == 'default' )) { return true; } return false; } endif; if (!function_exists('cosmoswp_banner_section_display_color')) : /** * Enable Banner in main content area * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for banner section in main content area */ function cosmoswp_banner_section_display_color() { $banner_image_display = cosmoswp_get_theme_options('banner-section-display'); if ('color' == $banner_image_display) { return true; } return false; } endif; if (!function_exists('cosmoswp_custom_video_header_pages')) : /** * Enable Banner video in every pages * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for banner video in all page of the site */ function cosmoswp_custom_video_header_pages($active) { $banner_section_display = cosmoswp_get_theme_options('banner-section-display'); if ('video' == $banner_section_display) { return true; } return false; } endif; if (!function_exists('cosmoswp_banner_section_display_image')) : /** * Enable Banner and set background image main content * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for banner section when background image set in main content area */ function cosmoswp_banner_section_display_image() { $banner_section_display = cosmoswp_get_theme_options('banner-section-display'); $banner_condition = array('normal-image', 'bg-image', 'video'); if (in_array($banner_section_display, $banner_condition)) { return true; } return false; } endif; if (!function_exists('cosmoswp_enable_banner_image_option_bg_image')) : /** * Enable Banner and set background image main content * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for banner section when background image set in main content area */ function cosmoswp_enable_banner_image_option_bg_image() { $banner_section_display = cosmoswp_get_theme_options('banner-section-display'); if ('bg-image' == $banner_section_display) { return true; } return false; } endif; if (!function_exists('cosmoswp_enable_overlay_active')) : /** * Overlay Enable Callback * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for banner section when background image and overlay*/ function cosmoswp_enable_overlay_active() { $banner_section_display = cosmoswp_get_theme_options('banner-section-display'); $overlay_not_display = array('hide', 'color'); if (!in_array($banner_section_display, $overlay_not_display)) { return true; } return false; } endif; if (!function_exists('cosmoswp_overlay_color_active')) : /** * Overlay color callback * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for banner section for overlay set */ function cosmoswp_overlay_color_active() { $enable_overlay = cosmoswp_get_theme_options('enable-banner-overlay-color'); $banner_section_display = cosmoswp_get_theme_options('banner-section-display'); $overlay_not_display = array('hide', 'color'); if ((!in_array($banner_section_display, $overlay_not_display)) && $enable_overlay == true) { return true; } return false; } endif; if (!function_exists('cosmoswp_banner_height_activecallback')) : /** * Video banner height callback * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for video banner */ function cosmoswp_banner_height_activecallback() { $banner_section_display = cosmoswp_get_theme_options('banner-section-display'); $banner_condition = array('video', 'color','bg-image'); if (in_array($banner_section_display, $banner_condition)) { return true; } return false; } endif; if (!function_exists('cosmoswp_breadcrumb_activecallback')) : /** * Breadcreumb not hidden callback * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for bredcrumb not hidden */ function cosmoswp_breadcrumb_activecallback() { $breadcrumb_enable = cosmoswp_get_theme_options('cosmoswp-breadcrumb-options'); if ('disable' != $breadcrumb_enable) { return true; } return false; } endif; if (!function_exists('cosmoswp_breadcrumb_With_banner_activecallback')) : /** * Breadcreumb not hidden callback * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for bredcrumb not hidden */ function cosmoswp_breadcrumb_With_banner_activecallback() { $breadcrumb_enable = cosmoswp_get_theme_options('cosmoswp-breadcrumb-options'); if ('disable' != $breadcrumb_enable) { return true; } return false; } endif; if (!function_exists('cosmoswp_post_pagination_activecallback')) : /** * Post Default Pagination callback * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for post pagination not hidden */ function cosmoswp_post_pagination_activecallback() { $post_pagination_option = cosmoswp_get_theme_options('post-navigation-options'); if ('default' == $post_pagination_option) { return true; } return false; } endif; if (!function_exists('cosmoswp_blog_pagination_active')) : /** * Blog Pagination active * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for blog pagination not disable */ function cosmoswp_blog_pagination_active() { $blog_pagination_option = cosmoswp_get_theme_options('blog-navigation-options'); $option_list = array('disable', 'default'); if (!in_array($blog_pagination_option, $option_list)) { return true; } return false; } endif; if (!function_exists('cosmoswp_blog_layout_column')) : /** * Blog Pagination active * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for blog pagination not disable */ function cosmoswp_blog_layout_column() { $blog_layout_option = cosmoswp_get_theme_options('blog-post-view-layout'); if ($blog_layout_option == 'column-layout') { return true; } return false; } endif; if (!function_exists('cosmoswp_blog_numeric_pagination_activecallback')) : /** * Blog Numeric Pagination callback * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for blog pagination not hidden */ function cosmoswp_blog_numeric_pagination_activecallback() { $blog_pagination_option = cosmoswp_get_theme_options('blog-navigation-options'); if ('numeric' == $blog_pagination_option) { return true; } return false; } endif; if (!function_exists('cosmoswp_blog_default_pagination_activecallback')) : /** * Blog Default Pagination callback * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ /*active callback function for blog pagination not hidden */ function cosmoswp_blog_default_pagination_activecallback() { $blog_pagination_option = cosmoswp_get_theme_options('blog-navigation-options'); if ('default' == $blog_pagination_option) { return true; } return false; } endif; if (!function_exists('cosmoswp_footer_sidebar_2_align')) : /** * Check if footer sidebar 2 align custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ function cosmoswp_footer_sidebar_2_align() { if ('custom' == cosmoswp_get_theme_options('footer-sidebar-2-widget-setting-option')) { return true; } return false; } endif; if (!function_exists('cosmoswp_footer_sidebar_3_align')) : /** * Check if footer sidebar 3 align custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ function cosmoswp_footer_sidebar_3_align() { if ('custom' == cosmoswp_get_theme_options('footer-sidebar-3-widget-setting-option')) { return true; } return false; } endif; if (!function_exists('cosmoswp_footer_sidebar_4_align')) : /** * Check if footer sidebar 4 align custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ function cosmoswp_footer_sidebar_4_align() { if ('custom' == cosmoswp_get_theme_options('footer-sidebar-4-widget-setting-option')) { return true; } return false; } endif; if (!function_exists('cosmoswp_footer_sidebar_5_align')) : /** * Check if footer sidebar 5 align custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ function cosmoswp_footer_sidebar_5_align() { if ('custom' == cosmoswp_get_theme_options('footer-sidebar-5-widget-setting-option')) { return true; } return false; } endif; if (!function_exists('cosmoswp_footer_sidebar_6_align')) : /** * Check if footer sidebar 6 align custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ function cosmoswp_footer_sidebar_6_align() { if ('custom' == cosmoswp_get_theme_options('footer-sidebar-6-widget-setting-option')) { return true; } return false; } endif; if (!function_exists('cosmoswp_footer_sidebar_7_align')) : /** * Check if footer sidebar 7 align custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ function cosmoswp_footer_sidebar_7_align() { if ('custom' == cosmoswp_get_theme_options('footer-sidebar-7-widget-setting-option')) { return true; } return false; } endif; if (!function_exists('cosmoswp_footer_sidebar_8_align')) : /** * Check if footer sidebar 8 align custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ function cosmoswp_footer_sidebar_8_align() { if ('custom' == cosmoswp_get_theme_options('footer-sidebar-8-widget-setting-option')) { return true; } return false; } endif; if (!function_exists('cosmoswp_scroll_top_indicator_if_text_or_both')) : /** * Check if Scroll Top Indicator Text * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ function cosmoswp_scroll_top_indicator_if_text_or_both() { $option_list = array('text', 'both'); $choosed_option = get_theme_mod('scroll-top-icon-options'); if ( in_array( $choosed_option, $option_list ) ) { return true; } return false; } endif; if (!function_exists('cosmoswp_scroll_top_indicator_if_both')) : /** * Check if Scroll Top Indicator Both * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ function cosmoswp_scroll_top_indicator_if_both() { if ('both' == cosmoswp_get_theme_options('scroll-top-icon-options')) { return true; } return false; } endif; if (!function_exists('cosmoswp_scroll_top_indicator_if_icon_or_both')) : /** * Check if Scroll Top Indicator Icon * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ function cosmoswp_scroll_top_indicator_if_icon_or_both() { $option_list = array('icon', 'both'); $choosed_option = cosmoswp_get_theme_options('scroll-top-icon-options'); if (in_array($choosed_option, $option_list)) { return true; } return false; } endif; if (!function_exists('cosmoswp_scroll_top_indicator_if_custom')) : /** * Check if Scroll Top typography custom * * @since cosmoswp 1.0.0 * * @param null * @return boolean * */ function cosmoswp_scroll_top_indicator_if_custom() { if (('custom' == cosmoswp_get_theme_options('scroll-top-icon-typography-options')) && ('icon' != cosmoswp_get_theme_options('scroll-top-icon-options'))) { return true; } return false; } endif;