Error
Undefined constant "Theme\WP_ENV" Error thrown with message "Undefined constant "Theme\WP_ENV"" Stacktrace: #12 Error in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-content/themes/euro/resources/classes/CustomFunc.php:36 #11 Theme\CustomFunc:is_dev in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-content/themes/euro/resources/classes/SetupTheme.php:147 #10 Theme\SetupTheme:themeAssets in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/class-wp-hook.php:341 #9 WP_Hook:apply_filters in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/class-wp-hook.php:365 #8 WP_Hook:do_action in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/plugin.php:522 #7 do_action in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/script-loader.php:2311 #6 wp_enqueue_scripts in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-content/themes/euro/app/helpers.php:51 #5 App\template in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-content/themes/euro/app/filters.php:46 #4 App\{closure} in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/class-wp-hook.php:341 #3 WP_Hook:apply_filters in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/plugin.php:205 #2 apply_filters in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/template-loader.php:114 #1 require_once in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-blog-header.php:19 #0 require in /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/index.php:17
Stack frames (13)
12
Error
/resources/classes/CustomFunc.php36
11
Theme\CustomFunc is_dev
/resources/classes/SetupTheme.php147
10
Theme\SetupTheme themeAssets
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/class-wp-hook.php341
9
WP_Hook apply_filters
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/class-wp-hook.php365
8
WP_Hook do_action
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/plugin.php522
7
do_action
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/script-loader.php2311
6
wp_enqueue_scripts
/app/helpers.php51
5
App\template
/app/filters.php46
4
App\{closure}
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/class-wp-hook.php341
3
WP_Hook apply_filters
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/plugin.php205
2
apply_filters
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/template-loader.php114
1
require_once
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-blog-header.php19
0
require
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/index.php17
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-content/themes/euro/resources/classes/CustomFunc.php
            $url = substr($url, 1);
        }
        return get_template_directory_uri().'/assets/'. $url;
    }
 
    static function assetsPath($url = null) {
        if ( substr($url, 0, 1) === '/') {
            $url = substr($url, 1);
        }
        if ( substr($url, 1, 1) === '/') {
            $url = substr($url, 2);
        }
        if ( substr($url, 0, 1) === '.') {
            $url = substr($url, 1);
        }
        return get_template_directory().'/assets/'. $url;
    }
 
    public static function is_dev() {
        if (WP_ENV == 'development') {
            return true;
        } else {
            return true;
        }
    }
 
 
    /**
     * Echo header menu
     * @param bool $c_class
     * @param bool $menu_class
     */
    public static function header_menu($c_class = false, $menu_class = false, $c_id = false) {
        if (has_nav_menu('primary_navigation')) :
            $attr = array(
                'theme_location' => 'primary_navigation',
                'depth' => 2,
                'container' => 'div',
                'fallback_cb' => 'BootstrapNavWalker::fallback',
                'walker' => new BootstrapNavWalker(),
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-content/themes/euro/resources/classes/SetupTheme.php
    }
 
    public static function localePath() {
        $path = [];
 
        $path['dist'] = config('assets');
        $path['theme'] = config('theme');
 
        wp_enqueue_script('jquery');
        wp_localize_script('jquery', 'paths', $path);
    }
 
    public static function getVersion() {
        $theme = wp_get_theme();
 
        return $theme->get('Version');
    }
 
    public static function themeAssets() {
        custom::is_dev() ? $ver = microtime(1) : $ver = self::getVersion();
 
        $site_options = array(
            'ajaxUrl' => admin_url('admin-ajax.php'),
            'siteUrl' => get_site_url(),
            'siteHttpRoot' => $_SERVER['HTTP_HOST']
        );
 
        self::localePath();
 
        // [ REGISTER style/script ]
//    wp_register_style('owl.carousel', assets('plugins/owlcarousel/owl.carousel.css'));
//    wp_register_style('owl.theme', assets('plugins/owlcarousel/owl.theme.default.css'));
//    wp_register_script('owl.carousel', assets('plugins/owlcarousel/owl.carousel.js'), ['jquery'], false, true);
//        wp_register_script('cookie', assets('plugins/jquery-cookie/jquery.cookie.js'), ['jquery'], false, true);
//        wp_register_script('font_awesome', 'https://use.fontawesome.com/releases/v5.0.6/js/all.js', ['jquery'], 0, true);
 
        // [ SPECIFIC PAGE ]
//    if (is_singular('participants') OR is_page('vote')) {
//        wp_enqueue_style('owl.carousel');
//        wp_enqueue_style('owl.theme');
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/class-wp-hook.php
 
        $this->iterations[ $nesting_level ] = $this->priorities;
 
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
 
            $priority = $this->current_priority[ $nesting_level ];
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if ( ! $this->doing_action ) {
                    $args[0] = $value;
                }
 
                // Avoid the array_slice() if possible.
                if ( 0 === $the_['accepted_args'] ) {
                    $value = call_user_func( $the_['function'] );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        --$this->nesting_level;
 
        return $value;
    }
 
    /**
     * Calls the callback functions that have been added to an action hook.
     *
     * @since 4.7.0
     *
     * @param array $args Parameters to pass to the callback functions.
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/class-wp-hook.php
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        --$this->nesting_level;
 
        return $value;
    }
 
    /**
     * Calls the callback functions that have been added to an action hook.
     *
     * @since 4.7.0
     *
     * @param array $args Parameters to pass to the callback functions.
     */
    public function do_action( $args ) {
        $this->doing_action = true;
        $this->apply_filters( '', $args );
 
        // If there are recursive calls to the current action, we haven't finished it until we get to the last one.
        if ( ! $this->nesting_level ) {
            $this->doing_action = false;
        }
    }
 
    /**
     * Processes the functions hooked into the 'all' hook.
     *
     * @since 4.7.0
     *
     * @param array $args Arguments to pass to the hook callbacks. Passed by reference.
     */
    public function do_all_hook( &$args ) {
        $nesting_level                      = $this->nesting_level++;
        $this->iterations[ $nesting_level ] = $this->priorities;
 
        do {
            $priority = current( $this->iterations[ $nesting_level ] );
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/plugin.php
    if ( ! isset( $wp_filter[ $hook_name ] ) ) {
        if ( isset( $wp_filter['all'] ) ) {
            array_pop( $wp_current_filter );
        }
 
        return;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    if ( empty( $arg ) ) {
        $arg[] = '';
    } elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
        // Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
        $arg[0] = $arg[0][0];
    }
 
    $wp_filter[ $hook_name ]->do_action( $arg );
 
    array_pop( $wp_current_filter );
}
 
/**
 * Calls the callback functions that have been added to an action hook, specifying arguments in an array.
 *
 * @since 2.1.0
 *
 * @see do_action() This function is identical, but the arguments passed to the
 *                  functions hooked to `$hook_name` are supplied using an array.
 *
 * @global WP_Hook[] $wp_filter         Stores all of the filters and actions.
 * @global int[]     $wp_actions        Stores the number of times each action was triggered.
 * @global string[]  $wp_current_filter Stores the list of current filters with the current one last.
 *
 * @param string $hook_name The name of the action to be executed.
 * @param array  $args      The arguments supplied to the functions hooked to `$hook_name`.
 */
function do_action_ref_array( $hook_name, $args ) {
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/script-loader.php
     * @since 2.8.0
     */
    do_action( 'wp_print_footer_scripts' );
}
 
/**
 * Wrapper for do_action( 'wp_enqueue_scripts' ).
 *
 * Allows plugins to queue scripts for the front end using wp_enqueue_script().
 * Runs first in wp_head() where all is_home(), is_page(), etc. functions are available.
 *
 * @since 2.8.0
 */
function wp_enqueue_scripts() {
    /**
     * Fires when scripts and styles are enqueued.
     *
     * @since 2.8.0
     */
    do_action( 'wp_enqueue_scripts' );
}
 
/**
 * Prints the styles queue in the HTML head on admin pages.
 *
 * @since 2.8.0
 *
 * @global bool $concatenate_scripts
 *
 * @return string[] Handles of the styles that were printed.
 */
function print_admin_styles() {
    global $concatenate_scripts;
 
    $wp_styles = wp_styles();
 
    script_concat_settings();
    $wp_styles->do_concat = $concatenate_scripts;
    $wp_styles->do_items( false );
 
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-content/themes/euro/app/helpers.php
 */
function config($key = null, $default = null)
{
    if (is_null($key)) {
        return sage('config');
    }
    if (is_array($key)) {
        return sage('config')->set($key);
    }
    return sage('config')->get($key, $default);
}
/**
 * @param string $file
 * @param array $data
 * @return string
 */
function template($file, $data = [])
{
    if (remove_action('wp_head', 'wp_enqueue_scripts', 1)) {
        wp_enqueue_scripts();
    }
    return sage('blade')->render($file, $data);
}
/**
 * Retrieve path to a compiled blade view
 * @param $file
 * @param array $data
 * @return string
 */
function template_path($file, $data = [])
{
    return sage('blade')->compiledPath($file, $data);
}
/**
 * @param $asset
 * @return string
 */
function asset_path($asset)
{
    return sage('assets')->getUri($asset);
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-content/themes/euro/app/filters.php
    return ' &hellip; <a href="' . get_permalink() . '">' . __('Continued', 'sage') . '</a>';
});
/**
 * Template Hierarchy should search for .blade.php files
 */
collect([
    'index', '404', 'archive', 'author', 'category', 'tag', 'taxonomy', 'date', 'home',
    'frontpage', 'page', 'paged', 'search', 'single', 'singular', 'attachment'
])->map(function ($type) {
    add_filter("{$type}_template_hierarchy", __NAMESPACE__.'\\filter_templates');
});
/**
 * Render page using Blade
 */
add_filter('template_include', function ($template) {
    $data = collect(get_body_class())->reduce(function ($data, $class) use ($template) {
        return apply_filters("sage/template/{$class}/data", $data, $template);
    }, []);
    if ($template) {
        echo template($template, $data);
        return get_stylesheet_directory().'/index.php';
    }
    return $template;
}, PHP_INT_MAX);
/**
 * Tell WordPress how to find the compiled path of comments.blade.php
 */
add_filter('comments_template', function ($comments_template) {
    $comments_template = str_replace(
        [get_stylesheet_directory(), get_template_directory()],
        '',
        $comments_template
    );
    return template_path(locate_template(["views/{$comments_template}", $comments_template]) ?: $comments_template);
}, 100);
 
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/class-wp-hook.php
 
        $this->iterations[ $nesting_level ] = $this->priorities;
 
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
 
            $priority = $this->current_priority[ $nesting_level ];
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if ( ! $this->doing_action ) {
                    $args[0] = $value;
                }
 
                // Avoid the array_slice() if possible.
                if ( 0 === $the_['accepted_args'] ) {
                    $value = call_user_func( $the_['function'] );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        --$this->nesting_level;
 
        return $value;
    }
 
    /**
     * Calls the callback functions that have been added to an action hook.
     *
     * @since 4.7.0
     *
     * @param array $args Parameters to pass to the callback functions.
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/plugin.php
        $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
        _wp_call_all_hook( $all_args );
    }
 
    if ( ! isset( $wp_filter[ $hook_name ] ) ) {
        if ( isset( $wp_filter['all'] ) ) {
            array_pop( $wp_current_filter );
        }
 
        return $value;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    // Pass the value to WP_Hook.
    array_unshift( $args, $value );
 
    $filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Calls the callback functions that have been added to a filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 *                      functions hooked to `$hook_name` are supplied using an array.
 *
 * @global WP_Hook[] $wp_filter         Stores all of the filters and actions.
 * @global int[]     $wp_filters        Stores the number of times each filter was triggered.
 * @global string[]  $wp_current_filter Stores the list of current filters with the current one last.
 *
 * @param string $hook_name The name of the filter hook.
 * @param array  $args      The arguments supplied to the functions hooked to `$hook_name`.
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-includes/template-loader.php
            if ( 'is_attachment' === $tag ) {
                remove_filter( 'the_content', 'prepend_attachment' );
            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template = apply_filters( 'template_include', $template );
    if ( $template ) {
        /**
         * Fires immediately before including the template.
         *
         * @since 6.9.0
         *
         * @param string $template The path of the template about to be included.
         */
        do_action( 'wp_before_include_template', $template );
 
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/wp-blog-header.php
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
/sata1/home/users/ukreuroma/www/old.ukreuromaz.com/index.php
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );
 
/** Loads the WordPress Environment and Template */
require dirname(__FILE__) . '/wp-blog-header.php';
 

Environment & details:

empty
empty
empty
Key Value
selCurrency uah
language ua
empty
Key Value
SERVER_SOFTWARE Apache/2.4.54 (FreeBSD)
REQUEST_URI /
PHP_FCGI_CHILDREN 0
PATH /etc:/bin:/sbin:/usr/bin:/usr/sbin
PHP_FCGI_MAX_REQUESTS 400
PWD /var/fcgi/ukreuroma/old.ukreuromaz.com
PHPRC /usr/local/php80/etc/
PHP_INI_SCAN_DIR /var/fcgi/ukreuroma/old.ukreuromaz.com/
ORIG_SCRIPT_NAME /cgi-bin/php.cgi
ORIG_PATH_TRANSLATED /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/index.php
ORIG_PATH_INFO /index.php
ORIG_SCRIPT_FILENAME /var/fcgi/ukreuroma/old.ukreuromaz.com/php.cgi
SCRIPT_NAME /index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /index.php
REMOTE_PORT 35360
SCRIPT_FILENAME /sata1/home/users/ukreuroma/www/old.ukreuromaz.com/index.php
SERVER_ADMIN [email protected]
CONTEXT_DOCUMENT_ROOT /sata1/home/users/ukreuroma/www/old.ukreuromaz.com
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /sata1/home/users/ukreuroma/www/old.ukreuromaz.com
REMOTE_ADDR 104.23.197.94
SERVER_PORT 443
SERVER_ADDR 127.0.0.1
SERVER_NAME old.ukreuromaz.com
SERVER_SIGNATURE <address>Apache/2.4.54 (FreeBSD) Server at <a href=\"mailto:[email protected]\">old.ukreuromaz.com</a> Port 443</address>
LD_LIBRARY_PATH /usr/local/lib
HTTP_COOKIE selCurrency=uah; language=ua
HTTP_CF_VISITOR {\"scheme\":\"https\"}
HTTP_CF_IPCOUNTRY US
HTTP_CF_CONNECTING_IP 216.73.216.186
HTTP_CDN_LOOP cloudflare; loops=1
HTTP_CF_RAY 9cd5f1e2d896258a-CMH
HTTP_ACCEPT_ENCODING gzip, br
HTTP_ACCEPT */*
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_X_FORWARDED_FOR 216.73.216.186
HTTP_X_FORWARDED_PROTO https
HTTP_X_FORWARDED_PROTOCOL https
HTTP_X_REAL_IP 104.23.197.94
HTTP_HOST old.ukreuromaz.com
HTTP_CONNECTION close
HTTPS on
REDIRECT_STATUS 200
REDIRECT_HANDLER application/x-httpd-fastphp
REDIRECT_HTTPS on
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1771002686.218
REQUEST_TIME 1771002686
empty
0. Whoops\Handler\PrettyPageHandler