select-image.php (1753B)
1 <?php 2 /** 3 * Redux Framework select image config. 4 * For full documentation, please visit: http://devs.redux.io/ 5 * 6 * @package Redux Framework 7 */ 8 9 defined( 'ABSPATH' ) || exit; 10 11 Redux::set_section( 12 $opt_name, 13 array( 14 'title' => esc_html__( 'Select Image', 'your-textdomain-here' ), 15 'id' => 'select-select_image', 16 'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/select-image.html" target="_blank">https://devs.redux.io/core-fields/select-image.html</a>', 17 'subsection' => true, 18 'fields' => array( 19 array( 20 'id' => 'opt-select_image', 21 'type' => 'select_image', 22 'presets' => true, 23 'title' => esc_html__( 'Select Image', 'your-textdomain-here' ), 24 'options' => array( 25 array( 26 'alt' => 'Preset 1', 27 'img' => Redux_Core::$url . '../sample/presets/preset1.png', 28 'presets' => array( 29 'switch-on' => 1, 30 'switch-off' => 1, 31 'switch-parent' => 1, 32 ), 33 ), 34 array( 35 'alt' => 'Preset 2', 36 'img' => Redux_Core::$url . '../sample/presets/preset2.png', 37 'presets' => '{"opt-slider-label":"1", "opt-slider-text":"10"}', 38 ), 39 ), 40 'default' => Redux_Core::$url . '../sample/presets/preset2.png', 41 ), 42 array( 43 'id' => 'opt-select-image', 44 'type' => 'select_image', 45 'title' => esc_html__( 'Select Image', 'your-textdomain-here' ), 46 'subtitle' => esc_html__( 'A preview of the selected image will appear underneath the select box.', 'your-textdomain-here' ), 47 'options' => $sample_patterns, 48 'default' => Redux_Core::$url . '../sample/patterns/triangular.png', 49 ), 50 ), 51 ) 52 );