'; echo ''; wp_list_pages( array( 'title_li' => '', 'depth' => 1, 'number' => 5, ) ); echo ''; } endif; //============================================================= // Function to limit the number of words. //============================================================= function edu_care_limit_words($string, $word_limit) { $words = explode(' ', $string, ($word_limit + 1)); if(count($words) > $word_limit) { if(count($words) > $word_limit) { array_pop($words); return implode(' ', $words).'...'; } } else { return $string; } } //============================================================= // Function to check widget status //============================================================= if ( ! function_exists( 'edu_care_widget_count' ) ) : function edu_care_widget_count( $sidebar_names ){ $status = 0; foreach ($sidebar_names as $sidebar) { if( is_active_sidebar( $sidebar )){ $status = $status+1; } } return $status; } endif; //============================================================= // Active callback for info post section below slider //============================================================= if ( ! function_exists( 'edu_care_info_post' ) ) : function edu_care_info_post( $control ) { $info_post = $control->manager->get_setting('edu_care[ec_info]')->value(); if( !empty( $info_post ) ){ return true; } else { return false; } } endif; //============================================================= // Active callback for short info below news section //============================================================= if ( ! function_exists( 'edu_care_news_short_info' ) ) : function edu_care_news_short_info( $control ) { $short_info = $control->manager->get_setting('edu_care[ec_news]')->value(); if( !empty( $short_info ) ){ return true; } else { return false; } } endif; //============================================================= // Active callback for woocommerce enable/disable //============================================================= if ( ! function_exists( 'edu_care_woocommerce' ) ) : function edu_care_woocommerce( $control ) { if ( class_exists( 'WooCommerce' ) ) { return true; } else { return false; } } endif; //====================================================================== // Function for Edu care cart //====================================================================== if ( ! function_exists( 'edu_care_cart_link' ) ) { function edu_care_cart_link() { ?> ( cart->get_cart_contents_count() ) ); ?> ) absint($theme_options['slider_transition_duration']*1000), 'autoplayTimeout' => absint($theme_options['slider_transition_delay']*1000), )); } } add_action('wp_enqueue_scripts', 'edu_care_load_owl_scripts');