fix: harden CHRNX editor lifecycle
This commit is contained in:
12 files changed
+512
-95
No files matched your search
+5
-2
@@ -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' );
|
||||
Reference in new issue
Block a user