HEX
Server: Apache/2.4.29 (Ubuntu)
System: Linux bareserver 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User: root (0)
PHP: 7.2.24-0ubuntu0.18.04.17
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/html/site/newsite/wp-content/themes/ooze/inc/widgets/social-widget.php
<?php

if (!defined('ABSPATH')) {
    exit;
}

class Ooze_Social_Menu extends Ooze_Widget_Base
{

    /**
     * Constructor.
     */
    public function __construct()
    {
        $this->widget_cssclass = 'widget_ooze_social_menu';
        $this->widget_description = __("Displays social menu if you have set it.", 'ooze');
        $this->widget_id = 'ooze_social_menu';
        $this->widget_name = __('Ooze: Social Menu', 'ooze');
        $this->settings = array(
            'title' => array(
                'type' => 'text',
                'label' => __('Title', 'ooze'),
            ),
            'style' => array(
                'type' => 'select',
                'label' => __('Style', 'ooze'),
                'options' => array(
                    'style_1' => __('Style 1', 'ooze'),
                    'style_2' => __('Style 2', 'ooze'),
                    'style_3' => __('Style 3', 'ooze'),
                ),
                '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( 'ooze_before_social_menu');

        $style = $instance['style'];

        ?>
        <div class="ooze-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' => 'ooze-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.', 'ooze' );
            }
            ?>
        </div>
        <?php

        do_action( 'ooze_after_social_menu');

        $this->widget_end($args);

        echo ob_get_clean();
    }
}