OwlCyberSecurity - MANAGER
Edit File: class-social-widget.php
<?php if (!defined('ABSPATH')) { exit; } class Newsvista_Social_Menu extends Newsvista_Widget_Base { /** * Constructor. */ public function __construct() { $this->widget_cssclass = 'widget_newsvista_social_menu'; $this->widget_description = __("Displays social menu if you have set it.", 'newsvista'); $this->widget_id = 'newsvista_social_menu'; $this->widget_name = __('Newsvista: Social Menu', 'newsvista'); $this->settings = array( 'title' => array( 'type' => 'text', 'label' => __('Title', 'newsvista'), 'std' => __('Social Widget', 'newsvista'), ), 'style' => array( 'type' => 'select', 'label' => __('Style', 'newsvista'), 'options' => array( 'style_1' => __('Style 1', 'newsvista'), 'style_2' => __('Style 2', 'newsvista'), 'style_3' => __('Style 3', 'newsvista'), ), 'std' => 'style_1', ), ); parent::__construct(); } /** * Output widget. * * @see WP_Widget * * @param array $args * @param array $instance */ public function widget($args, $instance) { ob_start(); $this->widget_start($args, $instance); do_action( 'newsvista_before_social_menu'); $style = $instance['style']; ?> <div class="newsvista-social-menu-widget <?php echo esc_attr($style);?>"> <?php if ( has_nav_menu( 'social-menu' ) ) { wp_nav_menu(array( 'theme_location' => 'social-menu', 'container_class' => 'footer-navigation', 'fallback_cb' => false, 'depth' => 1, 'menu_class' => 'newsvista-social-icons reset-list-style', 'link_before' => '<span class="social-media-title">', 'link_after' => '</span>', ) ); }else{ esc_html_e( 'Social menu is not set. You need to create menu and assign it to Social Menu on Menu Settings.', 'newsvista' ); } ?> </div> <?php do_action( 'newsvista_after_social_menu'); $this->widget_end($args); echo ob_get_clean(); } }