Timber\ImageHelper::add_constants PHP Method

add_constants() protected static method

Adds a constant defining the path to the content directory relative to the site for example /wp-content or /content
protected static add_constants ( )
    protected static function add_constants()
    {
        if (!defined('WP_CONTENT_SUBDIR')) {
            $wp_content_path = str_replace(get_home_url(), '', WP_CONTENT_URL);
            define('WP_CONTENT_SUBDIR', $wp_content_path);
        }
    }