* @copyright Copyright (c) 2018, Chris Baldelomar * @link https://webplantmedia.com/product/brimstone-wordpress-theme/ * @license http://www.gnu.org/licenses/gpl-2.0.html */ if ( ! class_exists( 'Brimstone_Widget_Social_Menu' ) ) : /** * Class: Display static content from an specific page. * * @since Brimstone 1.01 * * @see Brimstone_Widget */ class Brimstone_Widget_Social_Menu extends Brimstone_Widget { /** * __construct * * @since Brimstone 1.01 * * @return void */ public function __construct() { $this->widget_id = 'brimstone-social-menu'; $this->widget_cssclass = 'brimstone-social-menu'; $this->widget_description = esc_html__( 'Displays your social menu icons in your footer or sidebar.', 'brimstone' ); $this->widget_name = esc_html__( 'Brimstone: Social Menu', 'brimstone' ); $this->settings = array( 'title' => array( 'type' => 'text', 'std' => '', 'label' => esc_html__( 'Title:', 'brimstone' ), 'sanitize' => 'text', ), 'align' => array( 'type' => 'select', 'std' => 'center', 'label' => esc_html__( 'Align:', 'brimstone' ), 'options' => array( 'left' => esc_html__( 'Left', 'brimstone' ), 'center' => esc_html__( 'Center', 'brimstone' ), 'right' => esc_html__( 'Right', 'brimstone' ), ), 'sanitize' => 'text', ), 'link_color' => array( 'type' => 'colorpicker', 'std' => '', 'label' => esc_html__( 'Text Color:', 'brimstone' ), 'description' => esc_html__( 'Leave blank to use default text color.', 'brimstone' ), 'sanitize' => 'color', ), 'link_hover_color' => array( 'type' => 'colorpicker', 'std' => '', 'label' => esc_html__( 'Link Color:', 'brimstone' ), 'description' => esc_html__( 'Leave blank to use default hover color.', 'brimstone' ), 'sanitize' => 'color', ), ); parent::__construct(); } /** * Widget function. * * @since Brimstone 1.01 * * @param array $args * @param array $instance * @return void */ public function widget( $args, $instance ) { $o = $this->sanitize( $instance ); if ( empty( $o['title'] ) ) { $args['before_widget'] = str_replace( 'class="widget', 'class="widget no-title', $args['before_widget'] ); } echo $args['before_widget']; /* WPCS: XSS OK. HTML output. */ ?>