Skip to content

Instantly share code, notes, and snippets.

@nextend
Created November 9, 2018 08:15
Show Gist options
  • Save nextend/267975067a7385b14019b685b3c3e941 to your computer and use it in GitHub Desktop.
Save nextend/267975067a7385b14019b685b3c3e941 to your computer and use it in GitHub Desktop.
Gutenberg block.php Smart Slider 3
<?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