Created
March 2, 2021 21:16
-
-
Save interplaydesign/b9264de5160b364e19d2f27cf7f08dfc to your computer and use it in GitHub Desktop.
Block Customization Plugin 1
This file contains hidden or 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 | |
| /** | |
| * Plugin Name: Core Block Customizations | |
| * This file is in your plugin folder and the folder and this file must have the same name | |
| **/ | |
| function icbc_enqueue() { | |
| wp_enqueue_script( | |
| 'icbc-script', | |
| plugins_url( 'js/core-block-customizations.js', __FILE__ ), | |
| array( 'wp-blocks' ) | |
| ); | |
| } | |
| add_action( 'enqueue_block_editor_assets', 'icbc_enqueue' ); | |
| function icbc_stylesheet() { | |
| wp_enqueue_style( 'icbc-script', | |
| plugins_url( 'css/core-block-customizations.css', __FILE__ ) ); | |
| } | |
| add_action( 'enqueue_block_assets', 'icbc_stylesheet' ); | |
| function icbc_public_javascript_enqueue(){ | |
| wp_enqueue_script( | |
| 'icbc-public-script', | |
| plugins_url( 'js/core-block-customizations-public.js', __FILE__ ), | |
| array() | |
| ); | |
| } | |
| add_action( 'wp_enqueue_scripts', 'icbc_public_javascript_enqueue' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment