Skip to content

Commit

Permalink
Use full namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
darylldoyle committed Nov 25, 2024
1 parent 2106989 commit 73333e7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions mu-plugins/10up-plugin/includes/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ function setup() {
add_action( 'admin_enqueue_scripts', 'TenUpPlugin\Core\admin_styles' );

// Editor styles. add_editor_style() doesn't work outside of a theme.
add_filter( 'mce_css', __NAMESPACE__ . '\\mce_css' );
add_filter( 'mce_css', 'TenUpPlugin\Core\mce_css' );
// Hook to allow async or defer on asset loading.
add_filter( 'script_loader_tag', __NAMESPACE__ . '\\script_loader_tag', 10, 2 );
add_filter( 'script_loader_tag', 'TenUpPlugin\Core\script_loader_tag', 10, 2 );

do_action( 'tenup_plugin_loaded' );
}
Expand Down
6 changes: 3 additions & 3 deletions themes/10up-theme/includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
*/
function setup() {
add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\\blocks_editor_styles' );
add_action( 'init', __NAMESPACE__ . '\\enqueue_block_specific_styles' );
add_action( 'init', __NAMESPACE__ . '\\register_theme_blocks' );
add_action( 'init', __NAMESPACE__ . '\\register_block_pattern_categories' );
add_action( 'init', 'TenUpTheme\Blocks\enqueue_block_specific_styles' );
add_action( 'init', 'TenUpTheme\Blocks\register_theme_blocks' );
add_action( 'init', 'TenUpTheme\Blocks\register_block_pattern_categories' );
}

/**
Expand Down
24 changes: 12 additions & 12 deletions themes/10up-theme/includes/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
* @return void
*/
function setup() {
add_action( 'init', __NAMESPACE__ . '\\init', apply_filters( 'tenup_theme_init_priority', 8 ) );
add_action( 'after_setup_theme', __NAMESPACE__ . '\\i18n' );
add_action( 'after_setup_theme', __NAMESPACE__ . '\\theme_setup' );
add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\scripts' );
add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\\admin_styles' );
add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\\admin_scripts' );
add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\\enqueue_block_editor_scripts' );
add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\styles' );
add_action( 'wp_head', __NAMESPACE__ . '\\js_detection', 0 );
add_action( 'wp_head', __NAMESPACE__ . '\\embed_ct_css', 0 );

add_filter( 'script_loader_tag', __NAMESPACE__ . '\\script_loader_tag', 10, 2 );
add_action( 'init', 'TenUpTheme\Core\init', apply_filters( 'tenup_theme_init_priority', 8 ) );
add_action( 'after_setup_theme', 'TenUpTheme\Core\i18n' );
add_action( 'after_setup_theme', 'TenUpTheme\Core\theme_setup' );
add_action( 'wp_enqueue_scripts', 'TenUpTheme\Core\scripts' );
add_action( 'admin_enqueue_scripts', 'TenUpTheme\Core\admin_styles' );
add_action( 'admin_enqueue_scripts', 'TenUpTheme\Core\admin_scripts' );
add_action( 'enqueue_block_editor_assets', 'TenUpTheme\Core\enqueue_block_editor_scripts' );
add_action( 'wp_enqueue_scripts', 'TenUpTheme\Core\styles' );
add_action( 'wp_head', 'TenUpTheme\Core\js_detection', 0 );
add_action( 'wp_head', 'TenUpTheme\Core\embed_ct_css', 0 );

add_filter( 'script_loader_tag', 'TenUpTheme\Core\script_loader_tag', 10, 2 );
}

/**
Expand Down

0 comments on commit 73333e7

Please sign in to comment.