403Webshell
Server IP : 192.241.186.36  /  Your IP : 216.73.216.164
Web Server : Apache/2.4.29 (Ubuntu)
System : Linux webserver7 4.15.0-194-generic #205-Ubuntu SMP Fri Sep 16 19:49:27 UTC 2022 x86_64
User : root ( 0)
PHP Version : 7.4.32
Disable Function : 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,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/adsonicdigital/wp-content/themes/xstore/framework/features/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/adsonicdigital/wp-content/themes/xstore/framework/features/gdpr.php
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

class XStore_GRPD {

    public static $instance = null;

    public static $is_customizer = false;

    public static $enable_cookies_popup = false;

    public function init() {
        $this->cookies_popup();
    }

    public function cookies_popup() {
        add_filter('etheme_et_js_config', function ($config) {
            $config['etCookies'] = array(
                'cache_time' => get_theme_mod('et_cookies_notice_cache', 3),
            );
            return $config;
        });
        add_action('after_page_wrapper', array($this, 'cookies_popup_content'));
    }
    public function cookies_popup_content() {
        self::$is_customizer = is_customize_preview();
        self::$enable_cookies_popup = get_theme_mod('et_cookies_notice_switcher', 0);

        // html_blocks_callback functions is located in XStore Core plugin
        if ( ! defined( 'ET_CORE_DIR' ) ) {
            return;
        }

        if ( !self::$is_customizer ) {
            if ( !self::$enable_cookies_popup) return;
            if ( isset( $_COOKIE['etheme_cookies'] ) && $_COOKIE['etheme_cookies'] == 'false' ) return;
        }

        $position = get_theme_mod('et_cookies_notice_position', 'left_bottom');
        $class = array(
            'pos-fixed',
            'hidden'
        );
        if ( !get_theme_mod('et_cookies_notice_visibility_et-desktop', true)) {
            $class[] = 'dt-hide';
        }
        if ( !get_theme_mod('et_cookies_notice_visibility_et-mobile', true)) {
            $class[] = 'mob-hide';
        }
        switch ($position) {
            case 'left_bottom':
                $class[] = 'bottom';
                $class[] = 'left';
                break;
            case 'right_bottom':
                $class[] = 'bottom';
                $class[] = 'right';
                break;
            case 'full_bottom':
                $class[] = 'bottom';
                $class[] = 'right';
                $class[] = 'left';
                break;
        }
        $content_class = array();
        if ( $position != 'full_bottom' ) {
            $content_class[] = 'align-' . get_theme_mod('et_cookies_notice_content_content_alignment', 'center');
            if (get_theme_mod('et_cookies_notice_content_content_width_height', 'auto') == 'custom')
                $class[] = 'cookies-content-custom-dimensions';
        }
        $button_text = get_theme_mod('et_cookies_notice_content_button_text', esc_html__('Ok, I am ready', 'xstore'));
        $details_page = get_theme_mod('et_cookies_notice_details_page', '');
        $details_page_link = $details_page ? get_permalink( $details_page ) : '';
        ?>
        <div class="et-cookies-popup-wrapper <?php echo implode(' ', $class); ?>"<?php echo ( self::$is_customizer && !self::$enable_cookies_popup ) ? ' style="display: none;"' : ''; ?>>
            <span class="close pos-absolute right top">
                <svg xmlns="http://www.w3.org/2000/svg" width="0.55em" height="0.55em" viewBox="0 0 24 24"
                     fill="currentColor">
                    <path d="M13.056 12l10.728-10.704c0.144-0.144 0.216-0.336 0.216-0.552 0-0.192-0.072-0.384-0.216-0.528-0.144-0.12-0.336-0.216-0.528-0.216 0 0 0 0 0 0-0.192 0-0.408 0.072-0.528 0.216l-10.728 10.728-10.704-10.728c-0.288-0.288-0.768-0.288-1.056 0-0.168 0.144-0.24 0.336-0.24 0.528 0 0.216 0.072 0.408 0.216 0.552l10.728 10.704-10.728 10.704c-0.144 0.144-0.216 0.336-0.216 0.552s0.072 0.384 0.216 0.528c0.288 0.288 0.768 0.288 1.056 0l10.728-10.728 10.704 10.704c0.144 0.144 0.336 0.216 0.528 0.216s0.384-0.072 0.528-0.216c0.144-0.144 0.216-0.336 0.216-0.528s-0.072-0.384-0.216-0.528l-10.704-10.704z"></path>
                </svg>
            </span>
            <div class="cookies-content <?php echo implode(' ', $content_class); ?>">
                <?php
                    echo html_blocks_callback(array(
                        'section' => 'et_cookies_notice_content_section',
                        'sections' => 'et_cookies_notice_content_sections',
                        'html_backup' => 'et_cookies_notice_content',
                        'html_backup_default' => sprintf(esc_html__('This website uses cookies to improve your experience. %s By using this website you agree to our %s.', 'xstore'), '<br/>', '<a href="#">'.esc_html__('Privacy Policy', 'xstore').'</a>'),
                        'section_content' => true
                    ));
                ?>
            </div>
            <?php
            if ( !empty($button_text) || $details_page_link ) {
                echo '<div class="text-center">';
                if ($details_page_link)
                    echo '<a href="' . $details_page_link . '" target="_blank" class="cookies-details">' . esc_html__('More details', 'xstore') . '</a>';
                if ( !empty($button_text) )
                    echo '<span class="cookies-button pointer black btn">' . $button_text . '</span>';
                echo '</div>';
            }
            ?>
        </div>
        <?php
    }

    /**
     * Returns the instance.
     *
     * @return object
     * @since  1.0.0
     */
    public static function get_instance( $shortcodes = array() ) {

        if ( null == self::$instance ) {
            self::$instance = new self( $shortcodes );
        }

        return self::$instance;
    }
}

$gdpr = new XStore_GRPD();
$gdpr->init();

Youez - 2016 - github.com/yon3zu
LinuXploit