'fa fa-long-arrow-up', 'right' => 'fa fa-long-arrow-right', 'bottom' => 'fa fa-long-arrow-down', 'left' => 'fa fa-long-arrow-left' ); public $side_labels; /** * Which side we will set */ public $units = array('px'); public function __construct( $manager, $id, $args = array() ) { parent::__construct( $manager, $id, $args ); $this->side_labels = array( 'top' => esc_html__( 'Top', 'barter' ), 'right' => esc_html__( 'Right', 'barter' ), 'bottom' => esc_html__( 'Bottom', 'barter' ), 'left' => esc_html__('Left', 'barter' ), ); } public function to_json() { parent::to_json(); $this->json['mode'] = $this->mode; $this->json['sides'] = $this->sides; $this->json['side_icons'] = $this->side_icons; $this->json['side_labels'] = $this->side_labels; $this->json['units'] = $this->units; $this->json['value'] = $this->value(); } /** * Don't render any content for this control from PHP. * * @see Barter_A13_Customize_Spacing_Control::content_template() */ public function render_content() {} /** * Render a JS template for the content of the spacing control. * */ public function content_template() { ?> <# var id = data.settings.default, id_prefix = _.uniqueId( 'el' ) + '-', value = data.value, units = data.units, selected_unit = typeof value.units !== "undefined" ? value.units : units[0], selected_attr = ' selected', mode = data.mode; #> <# if ( data.label ) { #> {{{ data.label }}} <# } #> <# if ( data.description ) { #> {{{ data.description }}} <# } #>
<# _.each( data.sides, function( side ) { #> <# } ); #>