' . __( 'Direct script access denied.', 'articled') . '' ); } $articled_control_arrays_range = array( 'site_max_width' => array( 'label' => __('Content Width (%)', 'articled'), 'description' => __('This options will work only. When You seleted "Boxed" Layout.', 'articled'), 'section' => 'articled_layout_section', 'min' => 50, 'max' => 100, ), 'site_inner_width' => array( 'label' => __('Container Width (px)', 'articled'), 'description' => __('Default is 910px. Works upto 910px screen', 'articled'), 'section' => 'articled_layout_section', 'min' => 700, 'max' => 1200, ), ); function articled_new_ranges($articled){ global $articled_control_arrays_range; foreach ($articled_control_arrays_range as $key => $value) { $articled->add_setting( $key, array('default' => isset($value['default']) ? $value['default'] : '', 'transport' => 'postMessage', )); $articled->add_control( new articled_range( $articled, $key.'_control', array( 'label' => $value['label'], 'section' => isset($value['section']) ? $value['section'] : '', 'description' => isset($value['description']) ? $value['description'] : '', 'settings' => $key, 'input_attrs' => array( 'min' => $value['min'], 'max' => $value['max'], 'step' => isset($value['step']) ? $value['step'] : 2, 'suffix' => isset($value['suffix']) ? $value['suffix'] : '', ), ) ) ); } } add_action( 'customize_register', 'articled_new_ranges' );