title = __( 'Socials', 'brandy' ); parent::__construct(); } protected function register_components() { $components = parent::register_components(); $components['items_direction'] = array( 'title' => array( 'text' => __( 'Items direction', 'brandy' ), 'type' => 'bold', 'show_devices' => true, ), 'type' => 'ButtonGroup', 'default_value' => array( 'desktop' => 'horizontal', 'tablet' => null, 'mobile' => null, ), 'options' => array( array( 'value' => 'horizontal', 'label' => __( 'Horizontal', 'brandy' ), ), array( 'value' => 'vertical', 'label' => __( 'Vertical', 'brandy' ), ), ), 'value_path' => array( 'items_direction' ), 'render_options' => array( 'type' => 'data_attribute', 'data' => array( array( 'selector' => '.brandy-social-list', 'name' => 'items-direction-desktop', 'value_path' => array( 'items_direction', 'desktop' ), ), array( 'selector' => '.brandy-social-list', 'name' => 'items-direction-tablet', 'value_path' => array( 'items_direction', 'tablet' ), ), array( 'selector' => '.brandy-social-list', 'name' => 'items-direction-mobile', 'value_path' => array( 'items_direction', 'mobile' ), ), ), ), ); return $components; } protected function register_layout() { $layout = parent::register_layout(); array_splice( $layout['general']['sections'], 2, 0, array( array( 'components' => array( 'items_direction' ), ), ) ); return $layout; } }