Skip to content

Instantly share code, notes, and snippets.

@Tepluypled
Last active Nov 27, 2019
Embed
What would you like to do?
Part2
<?php
function loadMyBlockFiles() {
wp_enqueue_script(
'my-test-text',
plugin_dir_url(__FILE__). 'custom.js',
array('wp-blocks', 'wp-i18n', 'wp-editor'),
true
);
}
add_action('enqueue_block_editor_assets', 'loadMyBlockFiles');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment