-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.php
42 lines (38 loc) · 1.18 KB
/
plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Plugin Name: Sticky Container
* Plugin URI: https://www.github.com/naxulanth/gutenberg-sticky-container
* Description: Add column blocks with a sticky element.
* Author: Underline Designs, Deniz Gülnar
* Author URI: https://www.github.com/naxulanth https://www.underlinedesigns.com
* Version: 1.0.0
* License: GPL2+
* License URI: https://www.gnu.org/licenses/gpl-2.0.txt
*
* @package CGB
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Block Initializer.
*/
require_once plugin_dir_path( __FILE__ ) . 'src/init.php';
/*add_filter('block_categories', function($categories, $post) {
return array_merge(
$categories,
array(
array(
'slug' => 'ud-blocks',
'title' => 'Underline Designs',
),
)
);
}, 10, 2);*/
//load scripts
add_action('wp_enqueue_scripts', 'ud_enqueue_scripts');
function ud_enqueue_scripts() {
wp_enqueue_script( 'theia-sticky-sidebar.min', plugins_url( '/js/theia-sticky-sidebar.min.js', __FILE__ ), array( 'jquery' ), '' );
wp_enqueue_script( 'ud-block-scripts', plugins_url( '/js/scripts.js', __FILE__ ), array( 'jquery' ), '' );
}