Skip to content

Commit

Permalink
Force the \ to the native functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahe committed Feb 10, 2022
1 parent ce8ac23 commit 14d1789
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/Services/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function register_assets(): void {
$this->assets_tools->register_script( 'scripts', 'dist/' . $file, $scripts_dependencies, $theme->get( 'Version' ), true );

// CSS
wp_register_style( 'theme-style', get_stylesheet_uri(), [], $theme->get( 'Version' ) );
\wp_register_style( 'theme-style', \get_stylesheet_uri(), [], $theme->get( 'Version' ) );
}

/**
Expand Down Expand Up @@ -98,6 +98,7 @@ public function enqueue_styles(): void {
*/
public function stylesheet_uri( string $stylesheet_uri ): string {
if ( ! defined( 'SCRIPT_DEBUG' ) || SCRIPT_DEBUG === false ) {

$file = $this->get_min_file( 'css' );
if ( ! empty( $file ) && file_exists( \get_theme_file_path( '/dist/' . $file ) ) ) {
return \get_theme_file_uri( '/dist/' . $file );
Expand Down

0 comments on commit 14d1789

Please sign in to comment.