Skip to main content

wpb_after_register_backend_editor_js

Fires after WPBakery registers its JavaScript files for the backend editor. Receives the Vc_Backend_Editor instance. Use this hook to register or enqueue additional JavaScript files for the backend editor.

Parameters

ParameterTypeDescription
$editorVc_Backend_EditorThe backend editor instance.

Usage

add_action( 'wpb_after_register_backend_editor_js', 'wpb_register_custom_backend_js' );

function wpb_register_custom_backend_js( $editor ) {
wp_register_script(
'my-backend-editor-js',
plugins_url( 'js/backend-editor.js', __FILE__ ),
[ 'vc-backend-actions-js' ],
'1.0.0',
true
);
wp_enqueue_script( 'my-backend-editor-js' );
}

Source

File: include/classes/editors/class-vc-backend-editor.php