HEX
Server: Apache
System: Linux mare-tim-wwwmocrea 6.8.12-9-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-9 (2025-03-16T19:18Z) x86_64
User: www-data (33)
PHP: 7.4.33
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,pcntl_unshare,
Upload Files
File: //proc/2301933/cwd/wp-content/plugins/ottar-core/shortcodes/shortcodes-functions.php
<?php

if (!function_exists('ottar_core_include_shortcodes_file')) {
    /**
     * Loades all shortcodes by going through all folders that are placed directly in shortcodes folder
     */
    function ottar_core_include_shortcodes_file() {
        foreach (glob(OTTAR_CORE_SHORTCODES_PATH . '/*/load.php') as $shortcode_load) {
            include_once $shortcode_load;
        }

        do_action('ottar_core_action_include_shortcodes_file');
    }

    add_action('init', 'ottar_core_include_shortcodes_file', 6); // permission 6 is set to be before vc_before_init hook that has permission 9
}

if (!function_exists('ottar_core_load_shortcodes')) {
    function ottar_core_load_shortcodes() {
        include_once OTTAR_CORE_ABS_PATH . '/lib/shortcode-loader.php';

        OttarCore\Lib\ShortcodeLoader::getInstance()->load();
    }

    add_action('init', 'ottar_core_load_shortcodes', 7); // permission 7 is set to be before vc_before_init hook that has permission 9 and after ottar_core_include_shortcodes_file hook
}

if (!function_exists('ottar_core_add_admin_shortcodes_styles')) {
    /**
     * Function that includes shortcodes core styles for admin
     */
    function ottar_core_add_admin_shortcodes_styles() {

        //include shortcode styles for Visual Composer
        wp_enqueue_style('ottar-core-vc-shortcodes', OTTAR_CORE_ASSETS_URL_PATH . '/css/admin/ottar-vc-shortcodes.css');
    }

    add_action('ottar_edge_action_admin_scripts_init', 'ottar_core_add_admin_shortcodes_styles');
}

if (!function_exists('ottar_core_add_admin_shortcodes_custom_styles')) {
    /**
     * Function that print custom vc shortcodes style
     */
    function ottar_core_add_admin_shortcodes_custom_styles() {
        $style = apply_filters('ottar_core_filter_add_vc_shortcodes_custom_style', $style = '');
        $shortcodes_icon_styles = array();
        $shortcode_icon_size = 32;
        $shortcode_position = 0;

        $shortcodes_icon_class_array = apply_filters('ottar_core_filter_add_vc_shortcodes_custom_icon_class', $shortcodes_icon_class_array = array());
        sort($shortcodes_icon_class_array);

        if (!empty($shortcodes_icon_class_array)) {
            foreach ($shortcodes_icon_class_array as $shortcode_icon_class) {
                $mark = $shortcode_position != 0 ? '-' : '';

                $shortcodes_icon_styles[] = '.vc_element-icon.extended-custom-icon' . esc_attr($shortcode_icon_class) . ' {
					background-position: ' . $mark . esc_attr($shortcode_position * $shortcode_icon_size) . 'px 0;
				}';

                $shortcode_position++;
            }
        }

        if (!empty($shortcodes_icon_styles)) {
            $style .= implode(' ', $shortcodes_icon_styles);
        }

        if (!empty($style)) {
            wp_add_inline_style('ottar-core-vc-shortcodes', $style);
        }
    }

    add_action('ottar_edge_action_admin_scripts_init', 'ottar_core_add_admin_shortcodes_custom_styles');
}