spacing.php (2798B)
1 <?php 2 /** 3 * Redux Framework spacing 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__( 'Spacing', 'your-textdomain-here' ), 15 'id' => 'design-spacing', 16 'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/spacing.html" target="_blank">https://devs.redux.io/core-fields/spacing.html</a>', 17 'subsection' => true, 18 'fields' => array( 19 array( 20 'id' => 'opt-spacing', 21 'type' => 'spacing', 22 'output' => array( '.site-header' ), 23 24 // absolute, padding, margin, defaults to padding. 25 'mode' => 'margin', 26 27 // Have one field that applies to all. 28 'all' => true, 29 30 // You can specify a unit value. Possible: px, em, %. 31 'units' => 'em', 32 33 // Set to false to hide the units if the units are specified. 34 'display_units' => false, 35 'title' => esc_html__( 'Padding/Margin Option', 'your-textdomain-here' ), 36 'subtitle' => esc_html__( 'Allow your users to choose the spacing or margin they want.', 'your-textdomain-here' ), 37 'desc' => esc_html__( 'You can enable or disable any piece of this field. Top, Right, Bottom, Left, or Units.', 'your-textdomain-here' ), 38 'default' => array( 39 'margin-top' => '1', 40 'margin-right' => '2', 41 'margin-bottom' => '3', 42 'margin-left' => '4', 43 'units' => 'em', 44 ), 45 46 // phpcs:ignore Squiz.PHP.CommentedOutCode 47 // Allow users to select any type of unit. 48 // 'units_extended'=> 'true', // Enable extended units. 49 // 'top' => false, // Disable the top. 50 // 'right' => false, // Disable the right. 51 // 'bottom' => false, // Disable the bottom. 52 // 'left' => false, // Disable the left. 53 ), 54 array( 55 'id' => 'opt-spacing-expanded', 56 'type' => 'spacing', 57 'mode' => 'margin', 58 'all' => false, 59 'units' => array( 'em', 'px', '%' ), 60 'units_extended' => true, 61 'title' => __( 'Padding/Margin Option', 'your-textdomain-here' ), 62 'subtitle' => __( 'Allow your users to choose the spacing or margin they want.', 'your-textdomain-here' ), 63 'desc' => __( 'You can enable or disable any piece of this field. Top, Right, Bottom, Left, or Units.', 'your-textdomain-here' ), 64 'default' => array( 65 'margin-top' => '1', 66 'margin-right' => '2', 67 'margin-bottom' => '3', 68 'margin-left' => '5', 69 'units' => 'em', 70 ), 71 ), 72 ), 73 ) 74 );