PluginProbe
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites / 1.3.5
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites v1.3.5
4.1.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 2.6.1 All 38 releases
← All changes | src/init.php +30 -11 1.2.31.3.5 View file →
@@ -7,22 +7,34 @@
7 7 function blockspare_blocks_block_assets()
8 8 {
9 9
10 10 $min = (SCRIPT_DEBUG == true) ? '' : '.min';
11 +
12 + // Load the compiled styles.
11 13 wp_enqueue_style(
14 + 'blockspare-frontend-block-style-css',
15 + plugins_url('dist/blocks.style.build.css', dirname(__FILE__)),
16 + array()
17 + );
18 +
19 + }
20 +
21 + add_action('init', 'blockspare_blocks_block_assets');
22 +
23 +
24 + add_action('wp_enqueue_scripts', 'blockspare_load_scripts');
25 +
26 + function blockspare_load_scripts(){
27 +
28 + $min = (SCRIPT_DEBUG == true) ? '' : '.min';
29 +
30 + wp_enqueue_style(
12 31 'blockspare-blocks-fontawesome-front',
13 32 plugins_url('src/assets/fontawesome/css/all.css', dirname(__FILE__)),
14 33 array(),
15 34 filemtime(plugin_dir_path(__FILE__) . 'assets/fontawesome/css/all.css')
16 35 );
17 - // Load the compiled styles.
18 - wp_enqueue_style(
19 - 'blockspare-frontend-block-style-css',
20 - plugins_url('dist/blocks.style.build.css', dirname(__FILE__)),
21 - array()
22 - );
23 -
24 -
36 +
25 37 wp_enqueue_style('slick', BLOCKSPARE_PLUGIN_URL . 'src/assets/slick/css/slick.css', array(), '', 'all');
26 38 wp_enqueue_script('slick-js', BLOCKSPARE_PLUGIN_URL . 'src/assets/slick/js/slick.js', array('jquery'), '', true);
27 39 wp_register_script('countup', BLOCKSPARE_PLUGIN_URL . 'src/assets/js/countup/jquery.counterup' . $min . '.js', array('waypoint'), true);
28 40
@@ -30,12 +42,12 @@
30 42 wp_enqueue_script('jquery-masonry');
31 43
32 44 wp_enqueue_script('blockspare-script', BLOCKSPARE_PLUGIN_URL . 'src/assets/js/frontend.js', array('jquery', 'waypoint', 'countup'), '', true);
33 45
46 + wp_enqueue_script('blockspare-tabs', BLOCKSPARE_PLUGIN_URL . 'src/assets/js/tabs.js', array('jquery'), '', true);
47 +
34 48 }
35 49
36 - add_action('init', 'blockspare_blocks_block_assets');
37 -
38 50 if (!function_exists('blockspare_create_block')) {
39 51
40 52
41 53 function blockspare_create_block()
@@ -90,9 +102,12 @@
90 102 'srcUrl' => untrailingslashit(plugins_url('/', BLOCKSPARE_BASE_DIR . '/dist/')),
91 103 'rest_url' => esc_url(rest_url()),
92 104 'img' => $blockspare_priview_img_url,
93 105 'menu_img_url' => $blockspare_food_img_url,
94 - 'taxonomies'=> json_encode($txnm)
106 + 'taxonomies'=> json_encode($txnm),
107 + 'config' => '',
108 + 'configuration' => '',
109 + 'settings' => '',
95 110 )
96 111 );
97 112 }
98 113
@@ -109,8 +124,9 @@
109 124 //Load Gutenberg Block php Files
110 125 include(BLOCKSPARE_PLUGIN_DIR . '/src/blocks/social-sharing/index.php');
111 126 include(BLOCKSPARE_PLUGIN_DIR . '/src/blocks/latest-posts-grid/index.php');
112 127 include(BLOCKSPARE_PLUGIN_DIR . '/src/blocks/latest-posts-list/index.php');
128 + //include(BLOCKSPARE_PLUGIN_DIR . '/src/blocks/pattern/pattern.php');
113 129
114 130
115 131 }
116 132
@@ -122,7 +138,10 @@
122 138 function blockspare_enqueue_admin_style()
123 139 {
124 140 wp_enqueue_style('slick', BLOCKSPARE_PLUGIN_URL . 'src/assets/slick/css/slick.css', array(), '', 'all');
125 141 }
142 +
143 +
144 +
126 145
127 146
128 147