From 1a4920903e0ddb46d49c92b18ba51d5af973a7e8 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Wed, 25 Aug 2021 17:02:25 -0500 Subject: [PATCH] Add prefix to style and script handles --- themes/10up-theme/includes/core.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/themes/10up-theme/includes/core.php b/themes/10up-theme/includes/core.php index 6944b3c2..dcbceb34 100755 --- a/themes/10up-theme/includes/core.php +++ b/themes/10up-theme/includes/core.php @@ -76,7 +76,7 @@ function theme_setup() { function scripts() { wp_enqueue_script( - 'frontend', + 'tenup_theme_frontend', TENUP_THEME_TEMPLATE_URL . '/dist/js/frontend.js', Utility\get_asset_info( 'frontend', 'dependencies' ), Utility\get_asset_info( 'frontend', 'version' ), @@ -85,7 +85,7 @@ function scripts() { if ( is_page_template( 'templates/page-styleguide.php' ) ) { wp_enqueue_script( - 'styleguide', + 'tenup_theme_styleguide', TENUP_THEME_TEMPLATE_URL . '/dist/js/styleguide.js', Utility\get_asset_info( 'styleguide', 'dependencies' ), Utility\get_asset_info( 'styleguide', 'version' ), @@ -95,7 +95,7 @@ function scripts() { /* wp_enqueue_script( - 'shared', + 'tenup_theme_shared', TENUP_THEME_TEMPLATE_URL . '/dist/js/shared.js', Utility\get_asset_info( 'shared', 'dependencies' ), Utility\get_asset_info( 'shared', 'version' ), @@ -111,7 +111,7 @@ function scripts() { */ function admin_scripts() { wp_enqueue_script( - 'admin', + 'tenup_theme_admin', TENUP_THEME_TEMPLATE_URL . '/dist/js/admin.js', Utility\get_asset_info( 'admin', 'dependencies' ), Utility\get_asset_info( 'admin', 'version' ), @@ -120,7 +120,7 @@ function admin_scripts() { /* wp_enqueue_script( - 'shared', + 'tenup_theme_shared', TENUP_THEME_TEMPLATE_URL . '/dist/js/shared.js', Utility\get_asset_info( 'shared', 'dependencies' ), Utility\get_asset_info( 'shared', 'version' ), @@ -139,7 +139,7 @@ function core_block_overrides() { if ( file_exists( $overrides ) ) { $dep = require_once $overrides; wp_enqueue_script( - 'core-block-overrides', + 'tenup_theme_core-block-overrides', TENUP_THEME_DIST_URL . 'js/core-block-overrides.js', $dep['dependencies'], $dep['version'], @@ -156,7 +156,7 @@ function core_block_overrides() { function admin_styles() { wp_enqueue_style( - 'admin-style', + 'tenup_theme_admin-style', TENUP_THEME_TEMPLATE_URL . '/dist/css/admin-style.css', [], Utility\get_asset_info( 'admin-style', 'version' ) @@ -164,7 +164,7 @@ function admin_styles() { /* wp_enqueue_style( - 'shared-style', + 'tenup_theme_shared-style', TENUP_THEME_TEMPLATE_URL . '/dist/css/shared-style.css', [], Utility\get_asset_info( 'shared-style', 'version' ) @@ -180,7 +180,7 @@ function admin_styles() { function styles() { wp_enqueue_style( - 'styles', + 'tenup_theme_styles', TENUP_THEME_TEMPLATE_URL . '/dist/css/style.css', [], Utility\get_asset_info( 'style', 'version' ) @@ -188,7 +188,7 @@ function styles() { if ( is_page_template( 'templates/page-styleguide.php' ) ) { wp_enqueue_style( - 'styleguide', + 'tenup_theme_styleguide', TENUP_THEME_TEMPLATE_URL . '/dist/css/styleguide-style.css', [], Utility\get_asset_info( 'styleguide-style', 'version' )