'0', 'exclude' => '1', ) ); $allrounder_news_cat_array = array(); if( $select ){ $allrounder_news_cat_array[''] = esc_html__('--Select--','allrounder-news'); } foreach($allrounder_news_cat_lists as $allrounder_news_cat_list){ $allrounder_news_cat_array[$allrounder_news_cat_list->slug] = $allrounder_news_cat_list->name; } return $allrounder_news_cat_array; } endif; if( ! function_exists( 'allrounder_news_Posts_list' ) ) : /** Post Category List **/ function allrounder_news_Posts_list($select){ $posts = get_posts( array('posts_per_page' => -1) ); $post_lists = array(); if( $select ){ $post_lists[''] = esc_html__( 'Select Post', 'allrounder-news' ); } foreach($posts as $post) : $post_lists[$post->ID] = $post->post_title; endforeach; return $post_lists; } endif; if( ! function_exists( 'allrounder_news_home_sections_ed' ) ) : /** Returns Home Sections **/ function allrounder_news_home_sections_ed(){ $sections = array( 'slider' => array( 'banner' => 'slider' ), 'right-sidebar' => array( 'sidebar' => 'allrounder-news-home-right-sidebar' ), 'no-sidebar' => array( 'sidebar' => 'allrounder-news-home-no-sidebar' ), ); $ed_section = array(); foreach( $sections as $key => $value ){ if( array_key_exists( 'sidebar', $value ) ){ if( is_active_sidebar( $value['sidebar'] ) ) array_push( $ed_section, $key ); }else{ if( get_theme_mod( 'allrounder_news_slider_enable_disable','disable') == 'enable' ) array_push( $ed_section, $key ); } } return $ed_section; } endif; if( !function_exists('allrounder_news_post_category') ): /** Get Posts Categories **/ function allrounder_news_post_category(){ $allrounder_news_slider_cats = get_the_category( get_the_ID() ); $allrounder_news_cat_count = 1; if( $allrounder_news_slider_cats ){ foreach($allrounder_news_slider_cats as $allrounder_news_slider_cat){ ?>