radio.php (1632B)
1 <?php 2 /** 3 * Redux Framework radio box 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__( 'Radio', 'your-textdomain-here' ), 15 'id' => 'basic-radio', 16 'subsection' => true, 17 'customizer_width' => '500px', 18 'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/radio.html" target="_blank">https://devs.redux.io/core-fields/radio.html</a>', 19 'fields' => array( 20 array( 21 'id' => 'opt-radio', 22 'type' => 'radio', 23 'title' => esc_html__( 'Radio Option', 'your-textdomain-here' ), 24 'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ), 25 'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ), 26 27 // Must provide key => value pairs for radio options. 28 'options' => array( 29 '1' => 'Opt 1', 30 '2' => 'Opt 2', 31 '3' => 'Opt 3', 32 ), 33 'default' => '2', 34 ), 35 array( 36 'id' => 'opt-radio-data', 37 'type' => 'radio', 38 'title' => esc_html__( 'Radio Option w/ Menu Data', 'your-textdomain-here' ), 39 'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ), 40 'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ), 41 'data' => 'menu', 42 ), 43 ), 44 ) 45 );