array( 'label' => __('Display Breadcrumbs', 'articled'), 'priority' => 0, 'section'=> 'articled_breadcrumbs_section', ), ); function articled_new_toggles($articled){ global $articled_control_arrays_onoff; foreach ($articled_control_arrays_onoff as $key => $value) { $articled->add_setting( $key, array('default' => true, 'transport' => 'refresh', 'sanitize_callback' => 'articled_toggle_sanitize' )); $articled->add_control( new abu_onoff( $articled, $key, array( 'label' => $value['label'], 'section' => $value['section'], 'type' => 'ios', 'priority' => $value['priority'] ) ) ); } } add_action( 'customize_register', 'articled_new_toggles' ); ?>