dimensions.php (2088B)
1 <?php 2 /** 3 * Redux Framework dimensions 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__( 'Dimensions', 'your-textdomain-here' ), 15 'id' => 'design-dimensions', 16 'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/dimensions.html" target="_blank">https://devs.redux.io/core-fields/dimensions.html</a>', 17 'subsection' => true, 18 'fields' => array( 19 array( 20 'id' => 'opt-dimensions', 21 'type' => 'dimensions', 22 'units' => array( 'em', 'px', '%' ), // You can specify a unit value. Possible: px, em, %. 23 'units_extended' => 'true', // Allow users to select any type of unit. 24 'title' => esc_html__( 'Dimensions (Width/Height) Option', 'your-textdomain-here' ), 25 'subtitle' => esc_html__( 'Allow your users to choose width, height, and/or unit.', 'your-textdomain-here' ), 26 'desc' => esc_html__( 'You can enable or disable any piece of this field. Width, Height, or Units.', 'your-textdomain-here' ), 27 'default' => array( 28 'width' => 200, 29 'height' => 100, 30 ), 31 ), 32 array( 33 'id' => 'opt-dimensions-width', 34 'type' => 'dimensions', 35 'units' => array( 'em', 'px', '%' ), // You can specify a unit value. Possible: px, em, %. 36 'units_extended' => 'true', // Allow users to select any type of unit. 37 'title' => esc_html__( 'Dimensions (Width) Option', 'your-textdomain-here' ), 38 'subtitle' => esc_html__( 'Allow your users to choose width, height, and/or unit.', 'your-textdomain-here' ), 39 'desc' => esc_html__( 'You can enable or disable any piece of this field. Width, Height, or Units.', 'your-textdomain-here' ), 40 'height' => false, 41 'default' => array( 42 'width' => 200, 43 'height' => 100, 44 ), 45 ), 46 ), 47 ) 48 );