__( 'Serif', 'agpl' ), 'sans-serif' => __( 'Sans-sarif', 'agpl' ), 'cursive' => __( 'Display', 'agpl' ), 'cursive' => __( 'Handwriting', 'agpl' ), '' => __( 'Monospace', 'agpl' ), ), 50 ), array( 'body_font_type_setting', 'sans-serif', 'body_font_type', __( 'Select type of body font?', 'agpl' ), 'title_tagline', 'select', array( 'serif' => __( 'Serif', 'agpl' ), 'sans-serif' => __( 'Sans-sarif', 'agpl' ), 'cursive' => __( 'Display', 'agpl' ), 'cursive' => __( 'Handwriting', 'agpl' ), '' => __( 'Monospace', 'agpl' ), ), 80 ), array( 'front_page_menu_setting', 'one', 'front_page_menu', __( 'Which front page menu to show?', 'agpl' ), 'nav', 'radio', array( 'one' => __( 'Onepager menu, curated for long front page', 'agpl' ), 'multi' => __( 'Standard Header menu, if you have shorter front page by disabling many elements.', 'agpl' ), ), 30 ), array( 'primary_button_setting', 'green', 'primary_button', __( 'Select primary button colour', 'agpl' ), 'colour_section', 'select', array( 'red' => __( 'Red', 'agpl' ), 'blue' => __( 'Blue', 'agpl' ), 'green' => __( 'Green', 'agpl' ), 'purple' => __( 'Purple', 'agpl' ), 'yellow' => __( 'yellow', 'agpl' ), 'inverse' => __( 'Dark', 'agpl' ), 'default' => __( 'Light', 'agpl' ), ), 80 ), array( 'secondary_button_setting', 'purple', 'secondary_button', __( 'Select secondary button colour', 'agpl' ), 'colour_section', 'select', array( 'red' => __( 'Red', 'agpl' ), 'blue' => __( 'Blue', 'agpl' ), 'green' => __( 'Green', 'agpl' ), 'purple' => __( 'Purple', 'agpl' ), 'yellow' => __( 'yellow', 'agpl' ), 'inverse' => __( 'Dark', 'agpl' ), 'default' => __( 'Light', 'agpl' ), ), 90 ), array( 'small_button_setting', 'red', 'small_button', __( 'Select small button colour', 'agpl' ), 'colour_section', 'select', array( 'red' => __( 'Red', 'agpl' ), 'blue' => __( 'Blue', 'agpl' ), 'green' => __( 'Green', 'agpl' ), 'purple' => __( 'Purple', 'agpl' ), 'yellow' => __( 'yellow', 'agpl' ), 'inverse' => __( 'Dark', 'agpl' ), 'default' => __( 'Light', 'agpl' ), ), 100 ), array( 'pr_btn_direct_setting', 'FirstContLink', 'pr_btn_direct', __( 'Select which area in front page to reach after clicking on primary button?', 'agpl' ), 'temp_section', 'select', array( 'FirstServiceLink' => __( 'Services', 'agpl' ), 'FirstAboutLink' => __( 'About', 'agpl' ), 'FirstTeamLink' => __( 'Team', 'agpl' ), 'FirstPortLink' => __( 'Portfolio', 'agpl' ), 'FirstCustomerLink' => __( 'Customer', 'agpl' ), 'FirstContLink' => __( 'Contact', 'agpl' ), ), 40 ), array( 'skill_btn_direct_setting', 'SecondContLink', 'skill_btn_direct', __( 'Select which area to reach after click on call to action button?', 'agpl' ), 'temp_section', 'select', array( 'SecondServiceLink' => __( 'Services', 'agpl' ), 'SecondAboutLink' => __( 'About', 'agpl' ), 'SecondTeamLink' => __( 'Team', 'agpl' ), 'SecondPortLink' => __( 'Portfolio', 'agpl' ), 'SecondCustomerLink' => __( 'Customer', 'agpl' ), 'SecondContLink' => __( 'Contact', 'agpl' ), ), 240 ), array( 'single_sidebar_align_setting', 'left', 'single_sidebar_align', __( 'Select which dirction to place your sidebar in single post?', 'agpl' ), 'blog_pages_section', 'select', array( 'left' => __( 'Left', 'agpl' ), 'right' => __( 'Right', 'agpl' ), 'none' => __( 'No Sidebar', 'agpl' ), ), 70 ), ); $check_settings = array( array( 'menu_search_disable_setting', 0, 'menu_search_disable', __( 'disable the search button at archives and single post menu.', 'agpl' ), 'nav', 20 ), array( 'service_disable_setting', 0, 'service_disable', __( 'disable service section title, description and main service image', 'agpl' ), 'temp_section', 70 ), array( 'number_disable_setting', 0, 'number_disable', __( 'disable number section, following the service section in front page. If kept enabled edit following 4 options as instructed.', 'agpl' ), 'temp_section', 100 ), array( 'about_disable_setting', 0, 'about_disable', __( 'disable about area title, about text, \'About Area Sidebar\'', 'agpl' ), 'temp_section', 150 ), array( 'team_disable_setting', 0, 'team_disable', __( 'disable team area title, description, \'Set of Team Members Bar\'', 'agpl' ), 'temp_section', 180 ), array( 'team_call_disable_setting', 0, 'team_call_disable', __( 'disable call to action area under \'Set of Team Members Bar\' and top of \'Skill Set Bar\'. If kept enabled edit following 4 options.', 'agpl' ), 'temp_section', 210 ), array( 'skill_disable_setting', 0, 'skill_disable', __( 'disable skill set area title, description and \'Skill Set Bar\'', 'agpl' ), 'temp_section', 260 ), array( 'blog_disable_setting', 0, 'blog_disable', __( 'disable blog posts area', 'agpl' ), 'temp_section', 290 ), array( 'port_disable_setting', 0, 'port_disable', __( 'disable portfolio images, prohect description, area title and sub-title.', 'agpl' ), 'temp_section', 310 ), array( 'testimonial_disable_setting', 0, 'testimonial_disable', __( 'disable customer section title, sub-title and \'Testimonial Bar\'', 'agpl' ), 'temp_section', 340 ), array( 'customer_list_disable_setting', 0, 'customer_list_disable', __( 'disable list of customer company logos section', 'agpl' ), 'temp_section', 370 ), array( 'contact_disable_setting', 0, 'contact_disable', __( 'disable contact area title, sub-title and contact form', 'agpl' ), 'temp_section', 380 ), array( 'map_disable_setting', 0, 'map_disable', __( 'disable Google Map area with email, fax, phone and address text', 'agpl' ), 'temp_section', 410 ), array( 'email_list_disable_setting', 0, 'email_list_disable', __( 'disable entire email list collector section', 'agpl' ), 'footer_section', 10 ), array( 'foot_credit_disable_setting', 1, 'foot_credit_disable', __( 'disable footer credit link to the theme author. This will encourage us. Thanks!', 'agpl' ), 'footer_section', 60 ), array( 'comment_code_disable_setting', 1, 'comment_code_disable', __( 'disable \'allowed code statement text\' after comment form.', 'agpl' ), 'blog_pages_section', 60 ), ); return array( 'sections' => $new_sections, 'colour' => $colour_settings, 'image' => $image_settings, 'text' => $text_settings, 'textarea' => $area_settings, 'select' => $select_settings, 'checkbox' => $check_settings, ); } //set up the live editor add_action( 'customize_register', 'agpl_custom_settings' ); function agpl_custom_settings( $wp_customize ) { //get the variables $get_editor_vars = agpl_editor_vars(); $new_sections = $get_editor_vars['sections']; $colour_settings = $get_editor_vars['colour']; $image_settings = $get_editor_vars['image']; $text_settings = $get_editor_vars['text']; $area_settings = $get_editor_vars['textarea']; $select_settings = $get_editor_vars['select']; $check_settings = $get_editor_vars['checkbox']; //Custom textarea settings definition class Agpl_Customize_Textarea_Control extends WP_Customize_Control { public $type = 'textarea'; public function render_content() { ?>

sections() ) ) ) { $wp_customize->add_section( $key[0], array( 'title' => $key[1], 'description' => $key[2], 'priority' => $key[3], ) ); } } //Add colour settings and controls foreach ( $colour_settings as $key) { if ( ! in_array( $key[0], array_keys( $wp_customize->settings() ) ) ) { $wp_customize->add_setting($key[0], array( 'default' => $key[1], 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', )); } if ( ! in_array( $key[2], array_keys( $wp_customize->controls() ) ) ) { $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, $key[2], array( 'label' => $key[3], 'section' => $key[4], 'priority'=> $key[5], 'settings'=> $key[0], ))); } } //Add image settings and controls foreach( $image_settings as $key ) { if ( ! in_array( $key[0], array_keys( $wp_customize->settings() ) ) ) { $wp_customize->add_setting( $key[0], array( 'type' => 'option', ) ); } if ( ! in_array( $key[1], array_keys( $wp_customize->controls() ) ) ) { $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, $key[1], array( 'label' => $key[2], 'settings' => $key[0], 'section' => $key[3], 'priority' => $key[4], ) ) ); } } //Add text settings and controls foreach( $text_settings as $key ) { if ( ! in_array( $key[0], array_keys( $wp_customize->settings() ) ) ) { $wp_customize->add_setting( $key[0], array( 'default' => $key[1], ) ); } if ( ! in_array( $key[2], array_keys( $wp_customize->controls() ) ) ) { $wp_customize->add_control( $key[2], array( 'label' => $key[3], 'settings'=> $key[0], 'section' => $key[4], 'type' => 'text', 'priority'=> $key[5], ) ); } } //Add textarea settings and controls foreach( $area_settings as $key) { if ( ! in_array( $key[0], array_keys( $wp_customize->settings() ) ) ) { $wp_customize->add_setting( $key[0], array( 'default' => $key[1], ) ); } if ( ! in_array( $key[2], array_keys( $wp_customize->controls() ) ) ) { $wp_customize->add_control( new Agpl_Customize_Textarea_Control( $wp_customize, $key[2], array( 'label' => $key[3], 'section' => $key[4], 'settings' => $key[0], 'priority' => $key[5], ) ) ); } } //Add select input settings and controls foreach( $select_settings as $key ) { if ( ! in_array( $key[0], array_keys( $wp_customize->settings() ) ) ) { $wp_customize->add_setting( $key[0], array( 'default' => $key[1], 'type' => 'option', ) ); } if ( ! in_array( $key[2], array_keys( $wp_customize->controls() ) ) ) { $wp_customize->add_control( $key[2], array( 'label' => $key[3], 'settings' => $key[0], 'section' => $key[4], 'type' => $key[5], 'choices' => $key[6], 'priority' => $key[7], ) ); } } //Add checkbox settings and controls foreach( $check_settings as $key) { if ( ! in_array( $key[0], array_keys( $wp_customize->settings() ) ) ) { $wp_customize->add_setting( $key[0], array( 'default' => $key[1], ) ); } if ( ! in_array( $key[2], array_keys( $wp_customize->controls() ) ) ) { $wp_customize->add_control( $key[2], array( 'label' => __( 'Check to ', 'agpl' ) . $key[3], 'settings' => $key[0], 'section' => $key[4], 'type' => 'checkbox', 'priority' => $key[5], ) ); } } } ?>