Created
November 9, 2018 08:15
-
-
Save nextend/267975067a7385b14019b685b3c3e941 to your computer and use it in GitHub Desktop.
Gutenberg block.php Smart Slider 3
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 | |
defined('ABSPATH') || exit; | |
class NextendSmartSlider3Gutenberg { | |
public function __construct() { | |
add_action('enqueue_block_editor_assets', array( | |
$this, | |
'enqueue_block_editor_assets' | |
)); | |
} | |
public function enqueue_block_editor_assets() { | |
wp_enqueue_script('gutenberg-smartslider3', plugins_url('block.js', __FILE__), array( | |
'wp-blocks', | |
'wp-element', | |
'wp-components', | |
'wp-i18n', | |
'underscore' | |
), filemtime(plugin_dir_path(__FILE__) . 'block.js')); | |
wp_enqueue_style('gutenberg-smartslider3', plugins_url('style.css', __FILE__), array('wp-block-library'), filemtime(plugin_dir_path(__FILE__) . 'style.css')); | |
} | |
} | |
new NextendSmartSlider3Gutenberg(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment