balmet.com

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

repeater.php (2285B)


      1 <?php
      2 /**
      3  * Redux Repeater Sample config.
      4  *
      5  * For full documentation, please visit: http:https://devs.redux.io/
      6  *
      7  * @package Redux Pro
      8  */
      9 
     10 defined( 'ABSPATH' ) || exit;
     11 
     12 Redux::set_section(
     13 	$opt_name,
     14 	array(
     15 		'title'      => __( 'Repeater', 'your-textdomain-here' ),
     16 		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/premium/repeater.html" target="_blank">https://devs.redux.io/premium/repeater.html</a>',
     17 		'subsection' => true,
     18 		'fields'     => array(
     19 			array(
     20 				'id'          => 'repeater-field-id2',
     21 				'type'        => 'repeater',
     22 				'title'       => esc_html__( 'Repeater Demo', 'your-textdomain-here' ),
     23 				'full_width'  => true,
     24 				'subtitle'    => esc_html__( 'Repeater', 'your-textdomain-here' ),
     25 				'item_name'   => '',
     26 				'sortable'    => true,
     27 				'active'      => false,
     28 				'collapsible' => false,
     29 				'fields'      => array(
     30 					array(
     31 						'id'          => 'title_field',
     32 						'type'        => 'text',
     33 						'placeholder' => esc_html__( 'Title', 'your-textdomain-here' ),
     34 					),
     35 					array(
     36 						'id'          => 'textarea_field',
     37 						'type'        => 'textarea',
     38 						'placeholder' => esc_html__( 'Text Field', 'your-textdomain-here' ),
     39 						'default'     => 'Text Field here',
     40 					),
     41 					array(
     42 						'id'          => 'select_field',
     43 						'type'        => 'select',
     44 						'title'       => esc_html__( 'Select Field', 'your-textdomain-here' ),
     45 						'options'     => array(
     46 							'1' => esc_html__( 'Option 1', 'your-textdomain-here' ),
     47 							'2' => esc_html__( 'Option 2', 'your-textdomain-here' ),
     48 							'3' => esc_html__( 'Option 3', 'your-textdomain-here' ),
     49 						),
     50 						'placeholder' => esc_html__( 'Listing Field', 'your-textdomain-here' ),
     51 					),
     52 					array(
     53 						'id'          => 'switch_field',
     54 						'type'        => 'switch',
     55 						'placeholder' => esc_html__( 'Switch Field', 'your-textdomain-here' ),
     56 						'default'     => true,
     57 					),
     58 					array(
     59 						'id'          => 'text_field',
     60 						'type'        => 'text',
     61 						'placeholder' => esc_html__( 'Text Field', 'your-textdomain-here' ),
     62 						'required'    => array( 'switch_field', '=', false ),
     63 						'default'     => 'Text Field here',
     64 					),
     65 				),
     66 			),
     67 		),
     68 	)
     69 );