403Webshell
Server IP : 89.108.64.180  /  Your IP : 216.73.216.46
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : www-root ( 1010)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/testsite1441.ru/wp-content/themes/hotello/inc/vc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/testsite1441.ru/wp-content/themes/hotello/inc/vc//helpers.php
<?php

function hotello_vc_add_shadow_params($prefix = 'shadow')
{
    return array(
        array(
            'type' => 'textfield',
            'heading' => esc_html__('Shadow X offset', 'hotello'),
            'param_name' => $prefix . '_x_offset',
            'group' => esc_html__('Design Options', 'hotello'),
            'std' => 0
        ),
        array(
            'type' => 'textfield',
            'heading' => esc_html__('Shadow Y offset', 'hotello'),
            'param_name' => $prefix . '_y_offset',
            'group' => esc_html__('Design Options', 'hotello'),
            'std' => 0
        ),
        array(
            'type' => 'textfield',
            'heading' => esc_html__('Shadow blur', 'hotello'),
            'param_name' => $prefix . '_blur',
            'group' => esc_html__('Design Options', 'hotello'),
            'std' => 0
        ),
        array(
            'type' => 'textfield',
            'heading' => esc_html__('Shadow spread', 'hotello'),
            'param_name' => $prefix . '_spread',
            'group' => esc_html__('Design Options', 'hotello'),
            'std' => 0
        ),
        array(
            'type' => 'colorpicker',
            'heading' => esc_html__('Shadow color', 'hotello'),
            'param_name' => $prefix . '_color',
            'group' => esc_html__('Design Options', 'hotello'),
            'std' => 'transparent'
        )
    );
}

function hotello_load_styles($qty = 1, $param_name = 'style', $admin_label = false)
{
    $res = array();
    for ($i = 1; $i <= $qty; $i++) {
        $res[sprintf(esc_html__("Style %s", 'hotello'), $i)] = "style_{$i}";
    }

    $arr = array(
        'type' => 'dropdown',
        'heading' => esc_html__('Style', 'hotello'),
        'param_name' => $param_name,
        'value' => $res,
        'std' => 'style_1',
        'weight' => '1'
    );

    if ($admin_label) $arr['admin_label'] = true;

    return $arr;
}

function hotello_vc_add_css_editor_param($name = 'css', $params = array())
{
    $data = array(
        'type' => 'css_editor',
        'heading' => esc_html__('Css', 'hotello'),
        'param_name' => $name,
        'group' => esc_html__('Design options', 'hotello')
    );

    $data = wp_parse_args($params, $data);

    return apply_filters('hotel_vc_add_css_editor', $data);
}

function hotello_vc_bg_colors_param()
{
    return array(
        esc_html__('Primary', 'hotello') => 'mbc',
        esc_html__('Secondary', 'hotello') => 'sbc',
        esc_html__('Third', 'hotello') => 'tbc',
        esc_html__('Custom', 'hotello') => 'custom',
    );
}

function hotello_vc_align_param()
{
    return array(
        esc_html__('Left', 'hotello') => 'left',
        esc_html__('Center', 'hotello') => 'center',
        esc_html__('Right', 'hotello') => 'right',
    );
}

function hotello_vc_colors_param()
{
    return array(
        esc_html__('Primary', 'hotello') => 'mtc',
        esc_html__('Secondary', 'hotello') => 'stc',
        esc_html__('Third', 'hotello') => 'ttc',
        esc_html__('Custom', 'hotello') => 'custom',
    );
}

/**
 * Locate template in vc styles
 *
 * @param string|array $templates Single or array of template files
 *
 * @return string
 */
function hotello_locate_vc_element($templates, $template_name = '', $custom_path)
{
    $located = false;


    foreach ((array)$templates as $template) {

        $folder = $template;

        if (!empty($template_name)) {
            $template = $template_name;
        }

        if (substr($template, -4) !== '.php') {
            $template .= '.php';
        }


        if (empty($custom_path)) {
            if (!($located = locate_template('resources/partials/vc_parts/' . $folder . '/' . $template))) {
                $located = get_template_directory() . '/resources/partials/vc_parts/' . $folder . '/' . $template;
            }
        } else {
            if (!($located = locate_template($custom_path))) {
                $located = get_template_directory() . '/' . $custom_path . '.php';
            }
        }

        if (file_exists($template_name)) {
            break;
        }
    }

    return apply_filters('hotel_locate_vc_element', $located, $templates);
}

/**
 * Load vc part
 *
 * @param $__template
 * @param array $__vars
 */
function hotello_load_vc_element($__template, $__vars = array(), $__template_name = '', $custom_path = '')
{
    extract($__vars);
    $element = hotello_locate_vc_element($__template, $__template_name, $custom_path);
    if (!file_exists($element) && strpos($__template_name, 'style_') !== false) {
        $element = str_replace($__template_name, 'style_1', $element);
    }
    if (file_exists($element)) {
        include $element;
    } else {
        echo esc_html__('Element not found in ' . $element, 'hotello');
    }
}

add_action('vc_before_init', 'hotello_vc_set_as_theme');

function hotello_vc_set_as_theme()
{
    vc_set_as_theme(true);
}

if (function_exists('vc_set_default_editor_post_types')) {
    vc_set_default_editor_post_types(array(
        'page',
        'post',
        'product',
        'stm_sidebars',
        'stm_services',
        'stm_testimonials'
    ));
}

Youez - 2016 - github.com/yon3zu
LinuXploit