PluginProbe
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites / 1.2.1
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites v1.2.1
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 +11 -43 1.3.51.2.1 View file →
@@ -7,9 +7,14 @@
7 7 function blockspare_blocks_block_assets()
8 8 {
9 9
10 10 $min = (SCRIPT_DEBUG == true) ? '' : '.min';
11 -
11 + wp_enqueue_style(
12 + 'blockspare-blocks-fontawesome-front',
13 + plugins_url('src/assets/fontawesome/css/all.css', dirname(__FILE__)),
14 + array(),
15 + filemtime(plugin_dir_path(__FILE__) . 'assets/fontawesome/css/all.css')
16 + );
12 17 // Load the compiled styles.
13 18 wp_enqueue_style(
14 19 'blockspare-frontend-block-style-css',
15 20 plugins_url('dist/blocks.style.build.css', dirname(__FILE__)),
@@ -14,27 +19,10 @@
14 19 'blockspare-frontend-block-style-css',
15 20 plugins_url('dist/blocks.style.build.css', dirname(__FILE__)),
16 21 array()
17 22 );
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(
31 - 'blockspare-blocks-fontawesome-front',
32 - plugins_url('src/assets/fontawesome/css/all.css', dirname(__FILE__)),
33 - array(),
34 - filemtime(plugin_dir_path(__FILE__) . 'assets/fontawesome/css/all.css')
35 - );
36 -
23 +
24 +
37 25 wp_enqueue_style('slick', BLOCKSPARE_PLUGIN_URL . 'src/assets/slick/css/slick.css', array(), '', 'all');
38 26 wp_enqueue_script('slick-js', BLOCKSPARE_PLUGIN_URL . 'src/assets/slick/js/slick.js', array('jquery'), '', true);
39 27 wp_register_script('countup', BLOCKSPARE_PLUGIN_URL . 'src/assets/js/countup/jquery.counterup' . $min . '.js', array('waypoint'), true);
40 28
@@ -42,12 +30,12 @@
42 30 wp_enqueue_script('jquery-masonry');
43 31
44 32 wp_enqueue_script('blockspare-script', BLOCKSPARE_PLUGIN_URL . 'src/assets/js/frontend.js', array('jquery', 'waypoint', 'countup'), '', true);
45 33
46 - wp_enqueue_script('blockspare-tabs', BLOCKSPARE_PLUGIN_URL . 'src/assets/js/tabs.js', array('jquery'), '', true);
47 -
48 34 }
49 35
36 + add_action('init', 'blockspare_blocks_block_assets');
37 +
50 38 if (!function_exists('blockspare_create_block')) {
51 39
52 40
53 41 function blockspare_create_block()
@@ -82,20 +70,8 @@
82 70 $blockspare_priview_img_url = BLOCKSPARE_PLUGIN_URL . 'dist/images/blockspare-placeholder-img.jpg';
83 71 $blockspare_food_img_url = BLOCKSPARE_PLUGIN_URL . 'src/assets/blockspare-placeholder-img-square.jpg';
84 72
85 73
86 - $taxonomies = get_categories();
87 - $txnm = array();
88 -
89 - foreach( $taxonomies as $type ) {
90 -
91 -
92 - $txnm[] = array(
93 - 'label' => $type->name,
94 - 'value' => $type->term_id,
95 - );
96 - }
97 -
98 74 wp_localize_script(
99 75 'blockspare-blocks-block-js',
100 76 'blockspare_globals',
101 77 array(
@@ -101,13 +77,9 @@
101 77 array(
102 78 'srcUrl' => untrailingslashit(plugins_url('/', BLOCKSPARE_BASE_DIR . '/dist/')),
103 79 'rest_url' => esc_url(rest_url()),
104 80 'img' => $blockspare_priview_img_url,
105 - 'menu_img_url' => $blockspare_food_img_url,
106 - 'taxonomies'=> json_encode($txnm),
107 - 'config' => '',
108 - 'configuration' => '',
109 - 'settings' => '',
81 + 'menu_img_url' => $blockspare_food_img_url
110 82 )
111 83 );
112 84 }
113 85
@@ -124,9 +96,8 @@
124 96 //Load Gutenberg Block php Files
125 97 include(BLOCKSPARE_PLUGIN_DIR . '/src/blocks/social-sharing/index.php');
126 98 include(BLOCKSPARE_PLUGIN_DIR . '/src/blocks/latest-posts-grid/index.php');
127 99 include(BLOCKSPARE_PLUGIN_DIR . '/src/blocks/latest-posts-list/index.php');
128 - //include(BLOCKSPARE_PLUGIN_DIR . '/src/blocks/pattern/pattern.php');
129 100
130 101
131 102 }
132 103
@@ -138,10 +109,7 @@
138 109 function blockspare_enqueue_admin_style()
139 110 {
140 111 wp_enqueue_style('slick', BLOCKSPARE_PLUGIN_URL . 'src/assets/slick/css/slick.css', array(), '', 'all');
141 112 }
142 -
143 -
144 -
145 113
146 114
147 115