balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

button-set.php (1808B)


      1 <?php
      2 /**
      3  * Redux Framework button set 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__( 'Button Set', 'your-textdomain-here' ),
     15 		'id'         => 'switch_buttonset-set',
     16 		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/button-set.html" target="_blank">https://devs.redux.io/core-fields/button-set.html</a>',
     17 		'subsection' => true,
     18 		'fields'     => array(
     19 			array(
     20 				'id'       => 'opt-button-set',
     21 				'type'     => 'button_set',
     22 				'title'    => esc_html__( 'Button Set Option', 'your-textdomain-here' ),
     23 				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
     24 				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
     25 
     26 				// Must provide key => value pairs for radio options.
     27 				'options'  => array(
     28 					'1' => 'Opt 1',
     29 					'2' => 'Opt 2',
     30 					'3' => 'Opt 3',
     31 				),
     32 				'default'  => '2',
     33 			),
     34 			array(
     35 				'id'       => 'opt-button-set-multi',
     36 				'type'     => 'button_set',
     37 				'title'    => esc_html__( 'Button Set, Multi Select', 'your-textdomain-here' ),
     38 				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
     39 				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
     40 				'multi'    => true,
     41 
     42 				// Must provide key => value pairs for radio options.
     43 				'options'  => array(
     44 					'1' => 'Opt 1',
     45 					'2' => 'Opt 2',
     46 					'3' => 'Opt 3',
     47 				),
     48 				'default'  => array( '2', '3' ),
     49 			),
     50 		),
     51 	)
     52 );