| Server IP : 104.21.74.147 / Your IP : 216.73.217.154 Web Server : nginx/1.24.0 System : Linux wordpress-sites 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/rebeccaone.com/wp-content/themes/x/framework/classes/Services/ |
Upload File : |
<?php
namespace Themeco\Theme\Services;
use Themeco\Theme\Theme;
use Themeco\Theme\Util\VersionedUrl;
class Enqueue {
protected $theme;
protected $versionedUrl;
public function __construct(Theme $theme, VersionedUrl $versionedUrl) {
$this->theme = $theme;
$this->versionedUrl = $versionedUrl;
}
public function setup() {
add_action( 'wp_enqueue_scripts', [ $this, 'enqueue' ] );
$this->versionedUrl->configure( $this->theme->path, $this->theme->url );
}
public function enqueue() {
$customStack = x_is_custom_stack();
// x-theme stylesheet
if (!$customStack) {
// @TODO I don't think this is actually used, see frontend/styles.php
$file = $this->versionedUrl->get('framework/dist/theme','css');
wp_enqueue_style( 'x-theme', $file['url'], NULL, $file['version'], 'all' );
}
if ( is_child_theme() && apply_filters( 'x_enqueue_parent_stylesheet', false ) ) {
$deps = $customStack
? ['cs']
: ['x-stack'];
$rev = ( defined( 'X_CHILD_ASSET_REV' ) ) ? X_CHILD_ASSET_REV : X_ASSET_REV;
wp_enqueue_style( 'x-child', get_stylesheet_directory_uri() . '/style.css', $deps, $rev );
}
}
}