fix: harden CHRNX editor lifecycle

This commit is contained in:
chrnx committed 2026-08-11 15:06:50 -05:00
1 parent a5b94123a8
commit 835fb74ebf
12 files changed
+512 -95

No files matched your search

+5 -2
View File
@@ -32,7 +32,7 @@ function chrnx_enqueue_editor_assets() {
wp_enqueue_script(
'chrnx-editor-taxonomies',
get_theme_file_uri( 'assets/js/editor-taxonomies.js' ),
array( 'wp-components', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-plugins' ),
array( 'wp-components', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins' ),
CHRNX_VERSION,
true
);
@@ -40,9 +40,12 @@ function chrnx_enqueue_editor_assets() {
wp_enqueue_script(
'chrnx-editor-podcast',
get_theme_file_uri( 'assets/js/editor-podcast.js' ),
array( 'wp-components', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-plugins' ),
array( 'wp-components', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins' ),
CHRNX_VERSION,
true
);
wp_set_script_translations( 'chrnx-editor-taxonomies', 'chrnx', get_theme_file_path( 'languages' ) );
wp_set_script_translations( 'chrnx-editor-podcast', 'chrnx', get_theme_file_path( 'languages' ) );
}
add_action( 'enqueue_block_editor_assets', 'chrnx_enqueue_editor_assets' );