add_panel('callcenter_front_page_parallex_options', array(
'priority' => 2000,
'capability' => 'edit_theme_options',
'title' => __('Parallax Settings', 'callcenter'),
) );
$wp_customize->add_section('layout_section_manager_section', array(
'title' => __('Manage Sections Settings', 'callcenter'),
'panel' => 'callcenter_front_page_parallex_options',
'priority' => 9,
) );
$wp_customize->add_setting( 'layout_section_manager', array(
'sanitize_callback' => 'callcenter_pro_version_sanitize_text'
) );
$wp_customize->add_control( new callcenter_Theme_Support_layout( $wp_customize, 'layout_section_manager', array(
'section' => 'layout_section_manager_section',)
) );
}
add_action( 'customize_register', 'callcenter_front_page_parallex_customizer' );
function pages_choices(){
$pages = array();
$args = array(
'sort_order' => 'asc',
'sort_column' => 'post_title',
'hierarchical' => 1,
'child_of' => 0,
'parent' => -1,
'offset' => 0,
'post_type' => 'page',
'post_status' => 'publish'
);
$rows_pages = get_pages($args);
foreach($rows_pages as $val){
$pages[$val->ID]=$val->post_title;
}
return $pages;
}
function menus_choices(){
$menus = array();
$locations = get_nav_menu_locations();
$row_menu = wp_get_nav_menu_items( $locations['primary'] );
foreach($row_menu as $val){
$url = str_replace("#","",$val->url);
$menus[$url]=$val->post_title;
}
return $menus;
}
function position_choices(){
$pos = array(
1=>'services',
2=>'funfact',
3=>'about',
4=>'video',
5=>'profolio',
6=>'calltoaction',
7=>'team',
8=>'feature',
9=>'plans',
10=>'testimonials',
11=>'blog',
12=>'gmap',
13=>'contact',
14=>'subscriber',
15=>'clients',
);
return $pos;
}
function blogcat_choices(){
$cat = array();
$args = array(
'type' => 'post',
'child_of' => 0,
'parent' => '',
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => 1,
'hierarchical' => 1,
'exclude' => '',
'include' => '',
'number' => '',
'taxonomy' => 'category',
'pad_counts' => false
);
$categories = get_categories( $args );
foreach($categories as $val){
$cat[$val->term_id]=$val->name;
}
return $cat;
}