Last active
August 4, 2019 09:33
-
-
Save goiblas/d68ff8f26d5ce7db0730d27b446ebbd3 to your computer and use it in GitHub Desktop.
Registrar Bloque y encolar script (WordPress)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function block_restrict_content_register_block() { | |
wp_register_script( | |
'block_restrict_content', | |
plugins_url( 'build/index.js', __FILE__ ), | |
array( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components' ), | |
'1.0.0' | |
); | |
register_block_type( 'block-restrict-content/block-restrict-content', array( | |
'editor_script' => 'block_restrict_content', | |
) ); | |
} | |
add_action( 'init', 'block_restrict_content_register_block' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment