PluginProbe
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites / 3.3.3
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites v3.3.3
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 | inc/init.php +368 -207 2.1.23.3.3 View file →
@@ -1,230 +1,391 @@
1 1 <?php
2 -
3 - //Exit if directly acess
4 - defined('ABSPATH') or die('No script kiddies please!');
2 +//Exit if directly acess
3 +defined('ABSPATH') or die('No script kiddies please!');
5 4
6 - if(!class_exists('BlockspareInit')){
7 - class BlockspareInit{
8 - /**
9 - * Member Variable
10 - *
11 - * @var instance
12 - */
13 - private static $instance;
5 +if (!class_exists('BlockspareInit')) {
6 + class BlockspareInit
7 + {
8 + /**
9 + * Member Variable
10 + *
11 + * @var instance
12 + */
13 + private static $instance;
14 14
15 - /**
16 - * Initiator
17 - */
18 - public static function get_instance()
19 - {
20 - if (!isset(self::$instance))
21 - {
22 - self::$instance = new self();
23 - }
24 - return self::$instance;
15 + /**
16 + * Initiator
17 + */
18 + public static function get_instance()
19 + {
20 + if (!isset(self::$instance)) {
21 + self::$instance = new self();
22 + }
23 + return self::$instance;
24 + }
25 + public function __construct()
26 + {
27 + add_action('init', array($this, 'blockspare_blocks_block_assets'));
28 + add_action('enqueue_block_editor_assets', array($this, 'blockspare_create_block'));
29 + if (version_compare(get_bloginfo('version'), '5.8', '<')) {
30 + add_action('wp_enqueue_scripts', array($this, 'blockspare_load_scripts'));
31 + } else {
32 + add_action('enqueue_block_assets', array($this, 'blockspare_load_scripts'), 1);
33 + }
34 + add_action('plugins_loaded', array($this, 'blockspare_blocks_loader'));
35 + add_action('rest_api_init', array($this, 'blockspare_blocks_register_api_endpoints'));
36 + }
37 +
38 + public function blockspare_blocks_block_assets()
39 + {
40 + // wp_register_style(
41 + // 'fontawesome',
42 + // plugins_url('assets/fontawesome/css/all.css', dirname(__FILE__)),
43 + // array()
44 +
45 + // );
46 + // // Load the compiled styles.
47 + // wp_enqueue_style(
48 + // 'blockspare-frontend-block-style-css',
49 + // plugins_url('dist/style-blocks.css', dirname(__FILE__)),
50 + // array()
51 + // );
52 +
53 +
54 + // wp_register_style('slick', BLOCKSPARE_PLUGIN_URL . 'assets/slick/css/slick.css', array(), '', 'all');
55 + // if (is_admin()) {
56 + // wp_enqueue_style('slick');
57 + // }
58 +
59 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/accordion');
60 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/button');
61 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/call-to-action');
62 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/content-box');
63 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/container');
64 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/counter');
65 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/icon-set');
66 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/image-carousel');
67 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/linear-progressbar');
68 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/list');
69 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/logos');
70 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/image-masonry');
71 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/notice-bar');
72 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/price-list');
73 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/pricing-table');
74 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/social-links');
75 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/section-header');
76 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/services');
77 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/image-slider');
78 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/star-ratings');
79 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/testimonial');
80 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/user-profile');
81 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/shape-divider');
82 + register_block_type(BLOCKSPARE_PLUGIN_DIR . 'dist/blocks/empty-section');
83 +
84 + include BLOCKSPARE_PLUGIN_DIR . '/admin/notice-setup.php';
85 + include BLOCKSPARE_PLUGIN_DIR . '/admin/notice-upgrade.php';
86 + }
87 +
88 + public function blockspare_load_scripts()
89 + {
90 +
91 + wp_register_style(
92 + 'fontawesome',
93 + plugins_url('assets/fontawesome/css/all.css', dirname(__FILE__)),
94 + array()
95 +
96 + );
97 + // Load the compiled styles.
98 + wp_enqueue_style(
99 + 'blockspare-frontend-block-style-css',
100 + plugins_url('dist/style-blocks.css', dirname(__FILE__)),
101 + array()
102 + );
103 +
104 + wp_enqueue_style(
105 + 'blockspare-frontend-banner-style-css',
106 + plugins_url('dist/style-banner_group.css', dirname(__FILE__)),
107 + array()
108 + );
109 +
110 +
111 + wp_register_style('slick', BLOCKSPARE_PLUGIN_URL . 'assets/slick/css/slick.css', array(), '', 'all');
112 + if (is_admin()) {
113 + wp_enqueue_style('slick');
114 + }
115 +
116 + wp_enqueue_style('fontawesome');
117 + $min = (SCRIPT_DEBUG == true) ? '' : '.min';
118 + wp_register_script('slick', BLOCKSPARE_PLUGIN_URL . 'assets/slick/js/slick.js', array('jquery'), '', true);
119 + if (has_blocks() || has_block('blockspare/blockspare-carousel') || has_block('blockspare/blockspare-slider') || has_block('blockspare/latest-posts-block-carousel-grid') || has_block('blockspare/blockspare-posts-block-slider')) {
120 + wp_enqueue_script('slick');
121 + wp_enqueue_style('slick');
122 + }
123 +
124 + wp_register_script('countup', BLOCKSPARE_PLUGIN_URL . 'assets/js/countup/jquery.counterup.min.js', array('waypoint'), true);
125 + wp_enqueue_script('waypoint', BLOCKSPARE_PLUGIN_URL . 'assets/js/countup/waypoints.min.js', array('jquery'), '', true);
126 +
127 + if (has_blocks() || has_block('blockspare/blockspare-masonry')) {
128 + wp_enqueue_script('jquery-masonry');
129 + }
130 + wp_enqueue_script('blockspare-animation', BLOCKSPARE_PLUGIN_URL . 'dist/block_animation.js', array(), '', true);
131 + wp_enqueue_script('blockspare-script', BLOCKSPARE_PLUGIN_URL . 'dist/block_frontend.js', array('jquery', 'waypoint', 'countup'), '', true);
132 + if (has_blocks() || has_block('blockspare/blockspare-tabs')) {
133 +
134 + wp_enqueue_script('blockspare-tabs', BLOCKSPARE_PLUGIN_URL . 'dist/block_tabs.js', array('jquery'), '', true);
135 + }
136 + wp_register_script('blockspare-pagination-js', BLOCKSPARE_PLUGIN_URL . 'dist/block_pagination.js', array(), '', true);
137 + wp_localize_script('blockspare-pagination-js', 'blocsparePagination', array(
138 + 'ajaxurl' => admin_url('admin-ajax.php'),
139 + 'nonce' => wp_create_nonce('blockspare-load-more-nonce'),
140 + ));
141 + }
142 +
143 + public function blockspare_create_block()
144 + {
145 +
146 + $script_dep_path = BLOCKSPARE_BASE_DIR . 'dist/blocks.asset.php';
147 + $script_info = file_exists($script_dep_path) ? include $script_dep_path : array(
148 + 'dependencies' => array(),
149 + 'version' => BLOCKSPARE_VERSION,
150 + );
151 + if (version_compare(get_bloginfo('version'), '5.8', '<')) {
152 + $script_dep = array_merge($script_info['dependencies'], array(
153 + 'wp-blocks',
154 + 'wp-i18n',
155 + 'wp-element',
156 + 'wp-components',
157 + 'wp-editor',
158 + 'wp-api-fetch',
159 + ));
160 + } else {
161 + $script_dep = $script_info['dependencies'];
162 + }
163 +
164 + wp_enqueue_script(
165 + 'blockspare-blocks-block-js', // Handle.
166 + BLOCKSPARE_PLUGIN_URL . 'dist/blocks.js',
167 + $script_dep, // Dependencies, defined above.
168 + $script_info['version'], // AFT_PRICING_TABLE_VERSION.
169 + true
170 + // Enqueue the script in the footer.
171 + );
172 +
173 + wp_enqueue_script(
174 + 'blockspare-banner-group-js', // Handle.
175 + BLOCKSPARE_PLUGIN_URL . 'dist/banner_group.js',
176 + $script_dep, // Dependencies, defined above.
177 + $script_info['version'], // AFT_PRICING_TABLE_VERSION.
178 + true
179 + // Enqueue the script in the footer.
180 + );
181 +
182 +
183 +
184 + if (is_admin()):
185 + wp_enqueue_style('fontawesome');
186 + wp_enqueue_style(
187 + 'blockspare-block-edit-style',
188 + BLOCKSPARE_PLUGIN_URL . 'dist/blocks.css',
189 + array('wp-edit-blocks')
190 + );
191 + wp_enqueue_style(
192 + 'blockspare-banner-edit-style',
193 + BLOCKSPARE_PLUGIN_URL . 'dist/banner_group.css',
194 + array('wp-edit-blocks')
195 + );
196 +
197 + wp_enqueue_script('blockspare-design-btn', BLOCKSPARE_PLUGIN_URL . 'dist/block_design_btn.js', array('blockspare-blocks-block-js'), $script_info['version'], true);
198 + wp_enqueue_script('blockspare-design', BLOCKSPARE_PLUGIN_URL . 'dist/block_design.js', array('blockspare-blocks-block-js'), $script_info['version'], true);
199 + wp_enqueue_style('blockspare-design', BLOCKSPARE_PLUGIN_URL . 'dist/block_design.css', array('blockspare-block-edit-style'));
200 + endif;
201 +
202 + $blockspare_priview_img_url = BLOCKSPARE_PLUGIN_URL . 'assets/blockspare-placeholder-img.jpg';
203 + $blockspare_food_img_url = BLOCKSPARE_PLUGIN_URL . 'assets/blockspare-placeholder-img-square.jpg';
204 + $blockspare_dashboard_logo = BLOCKSPARE_PLUGIN_URL . 'assets/images/blockspare-logo.png';
205 + $taxonomies = get_categories();
206 + $txnm = array();
207 +
208 + foreach ($taxonomies as $type) {
209 +
210 + $txnm[] = array(
211 + 'label' => $type->name,
212 + 'value' => $type->term_id,
213 + );
214 + }
215 +
216 + $date = wp_kses_post(date_i18n(get_option('date_format')));
217 + $open_design = false;
218 + if (isset($_GET['blockspare_show_intro'])) {
219 + if ($_GET['blockspare_show_intro'] == 'true') {
220 + $open_design = true;
25 221 }
26 - public function __construct()
27 - {
28 - add_action('init', array($this, 'blockspare_blocks_block_assets' ));
29 - add_action('enqueue_block_editor_assets', array($this,'blockspare_create_block'));
30 - add_action('wp_enqueue_scripts', array($this,'blockspare_load_scripts'));
31 - add_action('plugins_loaded', array($this,'blockspare_blocks_loader'));
32 - add_action( 'rest_api_init', array($this,'blockspare_blocks_register_api_endpoints' ));
222 + }
223 + $date_format = date_i18n(get_option('date_format'), current_time('timestamp'));
224 +
225 + $blockData = '';
226 + if (isset($_GET['blockspare_create_block'])) {
227 + $blockName = $_GET['blockspare_create_block'];
228 + $blocks_lists = array();
229 +
230 + $filterdata = apply_filters('blockspare_template_library', $blocks_lists);
231 +
232 + foreach ($filterdata as $block) {
233 + if (isset($block['key']) && $block['key'] === $blockName) {
234 + // Found the block with the desired key, retrieve the content
235 + $blockData = $block['content'];
236 + break; // Stop looping once the desired block is found
237 + }
33 238 }
239 + }
34 240
35 - function blockspare_blocks_block_assets(){
36 - wp_enqueue_style(
37 - 'blockspare-blocks-fontawesome-front',
38 - plugins_url('assets/fontawesome/css/all.css', dirname(__FILE__)),
39 - array()
40 - );
41 - // Load the compiled styles.
42 - wp_enqueue_style(
43 - 'blockspare-frontend-block-style-css',
44 - plugins_url('dist/style-blocks.css', dirname(__FILE__)),
45 - array()
46 - );
47 -
48 -
49 - wp_enqueue_style('slick-css', BLOCKSPARE_PLUGIN_URL . 'assets/slick/css/slick.css', array(), '', 'all');
241 + global $pagenow;
242 + $loadscripton = true;
243 + if ($pagenow !== 'widgets.php' && !is_customize_preview()) {
244 + $loadscripton = false;
245 + }
246 + //$blockspare_current_wp_version = '6.5';
247 + $blockspare_current_wp_version = get_bloginfo('version');
248 +
249 + wp_localize_script(
250 + 'blockspare-blocks-block-js',
251 + 'blockspare_globals',
252 + array(
253 + 'srcUrl' => untrailingslashit(plugins_url('/', BLOCKSPARE_BASE_DIR . '/dist/')),
254 + 'rest_url' => esc_url(rest_url()),
255 + 'img' => $blockspare_priview_img_url,
256 + 'homeUrl' => home_url(),
257 + 'blogUrl' => get_site_url(),
258 + 'menu_img_url' => $blockspare_food_img_url,
259 + 'logo' => $blockspare_dashboard_logo,
260 + 'postTypes' => $this->aft_get_post_types(),
261 + 'taxonomies' => $this->aft_get_taxonomies(),
262 + 'postQueryEndpoint' => 'aft/v1/post-query',
263 + 'config' => '',
264 + 'configuration' => '',
265 + 'settings' => '',
266 + 'bs_date' => $date,
267 + "imagePath" => "https://raw.githubusercontent.com/afthemes/blockspare-demo-data/master/blocks/",
268 + "open_design" => $open_design,
269 + 'date_format ' => $date_format,
270 + 'blockData' => $blockData,
271 + 'template_link' => admin_url('edit.php?post_type=bs_templates'),
272 + 'newTemlateUrl' => admin_url('post-new.php?post_type=bs_templates&blockspare_create_block&blockspare_show_intro=true'),
273 + 'loadscripton' => $loadscripton,
274 + 'wpversion' => (version_compare($blockspare_current_wp_version, '6.6') >= 0) ? 'true' : 'false',
275 + )
276 + );
277 + }
278 +
279 + public function aft_get_post_types()
280 + {
281 + $args = array(
282 + 'public' => true,
283 + 'show_in_rest' => true,
284 + );
285 + $post_types = get_post_types($args, 'objects');
286 + $output = array();
287 + foreach ($post_types as $post_type) {
288 +
289 + if ('attachment' == $post_type->name) {
290 + continue;
50 291 }
292 + $output[] = array(
293 + 'value' => $post_type->name,
294 + 'label' => $post_type->label,
295 + );
296 + }
51 297
52 - function blockspare_load_scripts(){
53 - $min = (SCRIPT_DEBUG == true) ? '' : '.min';
54 - wp_enqueue_script('slick-js', BLOCKSPARE_PLUGIN_URL . 'assets/slick/js/slick.js', array('jquery'), '', true);
55 - wp_register_script('countup', BLOCKSPARE_PLUGIN_URL . 'assets/js/countup/jquery.counterup' . $min . '.js', array('waypoint'), true);
56 - wp_enqueue_script('waypoint', BLOCKSPARE_PLUGIN_URL . 'assets/js/countup/waypoints.min.js', array('jquery'), '', true);
57 - wp_enqueue_script('jquery-masonry');
58 - wp_enqueue_script('blockspare-animation', BLOCKSPARE_PLUGIN_URL . 'dist/block_animation.js', array(), '', true);
59 - wp_enqueue_script('blockspare-script', BLOCKSPARE_PLUGIN_URL . 'dist/block_frontend.js', array('jquery', 'waypoint', 'countup'), '', true);
60 - wp_enqueue_script('blockspare-tabs', BLOCKSPARE_PLUGIN_URL . 'dist/block_tabs.js', array('jquery'), '', true);
61 - wp_enqueue_script('blockspare-pagination-js', BLOCKSPARE_PLUGIN_URL . 'dist/block_pagination.js', array(), '', true);
298 + return apply_filters('aft_blocks_post_types', $output);
299 + }
62 300
63 - wp_localize_script('blockspare-pagination-js', 'blocsparePagination',array(
64 - 'ajaxurl' => admin_url( 'admin-ajax.php' ),
65 - 'nonce'=>wp_create_nonce('blockspare-load-more-nonce')
66 - ));
301 + public function aft_get_taxonomies()
302 + {
303 + $post_types = $this->aft_get_post_types();
304 + $output = array();
305 + foreach ($post_types as $key => $post_type) {
306 + $taxonomies = get_object_taxonomies($post_type['value'], 'objects');
307 + $taxs = array();
308 + foreach ($taxonomies as $term_slug => $term) {
309 + if (!$term->public || !$term->show_ui) {
310 + continue;
311 + }
312 + $taxs[$term_slug] = $term;
313 + $terms = get_terms($term_slug);
314 + $term_items = array();
315 + if (!empty($terms)) {
316 + foreach ($terms as $term_key => $term_item) {
317 + $term_items[] = array(
318 + 'value' => $term_item->term_id,
319 + 'label' => $term_item->name,
320 + );
321 + }
322 + $output[$post_type['value']]['terms'][$term_slug] = $term_items;
323 + }
67 324 }
325 + $output[$post_type['value']]['taxonomy'] = $taxs;
326 + }
68 327
69 - function blockspare_create_block(){
328 + return apply_filters('aft_blocks_taxonomies', $output);
329 + }
70 330
71 - $script_dep_path = BLOCKSPARE_BASE_DIR . 'dist/blocks.asset.php';
72 - $script_info = file_exists($script_dep_path) ? include $script_dep_path : array(
73 - 'dependencies' => array() ,
74 - 'version' => BLOCKSPARE_VERSION,
75 - );
76 - if (version_compare(get_bloginfo('version') , '5.8', '<'))
77 - {
78 - $script_dep = array_merge($script_info['dependencies'],array(
79 - 'wp-blocks',
80 - 'wp-i18n',
81 - 'wp-element',
82 - 'wp-components',
83 - 'wp-editor',
84 - 'wp-api-fetch'
85 - ));
86 - }
87 - else
88 - {
89 - $script_dep = $script_info['dependencies'];
90 - }
331 + public function blockspare_blocks_loader()
332 + {
91 333
92 - wp_enqueue_script('blockspare-blocks-block-js', // Handle.
93 - BLOCKSPARE_PLUGIN_URL . 'dist/blocks.js', $script_dep, // Dependencies, defined above.
94 - $script_info['version'], // AFT_PRICING_TABLE_VERSION.
95 - true
96 - // Enqueue the script in the footer.
97 - );
334 + if (PHP_VERSION_ID >= 50600) {
335 + require_once BLOCKSPARE_PLUGIN_DIR . 'inc/layout/class-image-importer.php';
336 + require_once BLOCKSPARE_PLUGIN_DIR . 'inc/layout/functions.php';
337 + require_once BLOCKSPARE_PLUGIN_DIR . 'inc/layout/registry.php';
338 + require_once BLOCKSPARE_PLUGIN_DIR . 'inc/layout/components.php';
98 339
99 - if (is_admin()) :
100 - wp_enqueue_style(
101 - 'blockspare-block-edit-style',
102 - BLOCKSPARE_PLUGIN_URL . 'dist/blocks.css',
103 - array('wp-edit-blocks')
104 - );
105 - endif;
106 -
107 -
108 - $blockspare_priview_img_url = BLOCKSPARE_PLUGIN_URL . 'assets/blockspare-placeholder-img.jpg';
109 - $blockspare_food_img_url = BLOCKSPARE_PLUGIN_URL . 'assets/blockspare-placeholder-img-square.jpg';
110 -
111 - $taxonomies = get_categories();
112 - $txnm = array();
113 -
114 - foreach( $taxonomies as $type ) {
115 -
116 -
117 - $txnm[] = array(
118 - 'label' => $type->name,
119 - 'value' => $type->term_id,
120 - );
121 - }
122 -
123 -
124 - wp_localize_script(
125 - 'blockspare-blocks-block-js',
126 - 'blockspare_globals',
127 - array(
128 - 'srcUrl' => untrailingslashit(plugins_url('/', BLOCKSPARE_BASE_DIR . '/dist/')),
129 - 'rest_url' => esc_url(rest_url()),
130 - 'img' => $blockspare_priview_img_url,
131 - 'menu_img_url' => $blockspare_food_img_url,
132 - 'postTypes' => $this->aft_get_post_types(),
133 - 'taxonomies' => $this->aft_get_taxonomies(),
134 - 'postQueryEndpoint'=>'aft/v1/post-query',
135 - 'config' => '',
136 - 'configuration' => '',
137 - 'settings' => '',
138 - )
139 - );
140 - }
340 + /**
341 + * REST API Endpoints for Layouts.
342 + */
343 + require_once BLOCKSPARE_PLUGIN_DIR . 'inc/layout/endpoints.php';
344 + require_once BLOCKSPARE_PLUGIN_DIR . 'inc/layout/save-templates.php';
141 345
142 - function aft_get_post_types(){
143 - $args = array(
144 - 'public' => true,
145 - 'show_in_rest' => true,
146 - );
147 - $post_types = get_post_types( $args, 'objects' );
148 - $output = array();
149 - foreach ( $post_types as $post_type ) {
150 -
151 - if ( 'attachment' == $post_type->name ) {
152 - continue;
153 - }
154 - $output[] = array(
155 - 'value' => $post_type->name,
156 - 'label' => $post_type->label,
157 - );
158 - }
346 + /**
347 + * Import Pattern
348 + */
159 349
160 - return apply_filters( 'aft_blocks_post_types', $output );
161 - }
350 + // require_once BLOCKSPARE_PLUGIN_DIR . 'inc/pattern/pattern.php';
351 + }
162 352
163 - function aft_get_taxonomies() {
164 - $post_types = $this->aft_get_post_types();
165 - $output = array();
166 - foreach ( $post_types as $key => $post_type ) {
167 - $taxonomies = get_object_taxonomies( $post_type['value'], 'objects' );
168 - $taxs = array();
169 - foreach ( $taxonomies as $term_slug => $term ) {
170 - if ( ! $term->public || ! $term->show_ui ) {
171 - continue;
172 - }
173 - $taxs[ $term_slug ] = $term;
174 - $terms = get_terms( $term_slug );
175 - $term_items = array();
176 - if ( ! empty( $terms ) ) {
177 - foreach ( $terms as $term_key => $term_item ) {
178 - $term_items[] = array(
179 - 'value' => $term_item->term_id,
180 - 'label' => $term_item->name,
181 - );
182 - }
183 - $output[ $post_type['value'] ]['terms'][ $term_slug ] = $term_items;
184 - }
185 - }
186 - $output[ $post_type['value'] ]['taxonomy'] = $taxs;
187 - }
188 -
189 - return apply_filters( 'aft_blocks_taxonomies', $output );
190 - }
353 + //Load Gutenberg Block php Files
354 + include BLOCKSPARE_PLUGIN_DIR . 'inc/other-block/date-time/index.php';
355 + include BLOCKSPARE_PLUGIN_DIR . '/inc/other-block/social-sharing/index.php';
356 + include BLOCKSPARE_PLUGIN_DIR . '/inc/latest-post-block/posts-grid/index.php';
357 + include BLOCKSPARE_PLUGIN_DIR . '/inc/latest-post-block/posts-list/index.php';
191 358
192 - function blockspare_blocks_loader(){
193 -
194 - //Load Gutenberg Block php Files
195 - include(BLOCKSPARE_PLUGIN_DIR . '/inc/other-block/social-sharing/index.php');
196 - include(BLOCKSPARE_PLUGIN_DIR . '/inc/latest-post-block/posts-grid/index.php');
197 - include(BLOCKSPARE_PLUGIN_DIR . '/inc/latest-post-block/posts-list/index.php');
198 -
199 - include(BLOCKSPARE_PLUGIN_DIR . '/inc/latest-post-block/posts-express-grid/index.php');
200 -
201 -
202 - include(BLOCKSPARE_PLUGIN_DIR . '/inc/latest-post-block/posts-carousel-grid/index.php');
203 - include(BLOCKSPARE_PLUGIN_DIR . '/inc/latest-post-block/posts-slider/index.php');
204 -
205 - include(BLOCKSPARE_PLUGIN_DIR . '/inc/block-banner/banner-1/index.php');
206 - include(BLOCKSPARE_PLUGIN_DIR . '/inc/block-banner/banner-2/index.php');
207 - include(BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/ajax-pagination.php');
208 - include(BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/class-post-rest-api.php');
209 - include(BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/class-multiauthor-backend.php');
210 - include(BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/class-multiauthor-frontend.php');
211 - include(BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/tax-category.php');
212 - include(BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/class-bs-post.php');
213 - include(BLOCKSPARE_PLUGIN_DIR . 'inc/block-banner/frontend-render/post-banner-config.php');
214 - include(BLOCKSPARE_PLUGIN_DIR . 'inc/block-banner/frontend-render/post-banner-style.php');
215 - }
359 + include BLOCKSPARE_PLUGIN_DIR . '/inc/latest-post-block/posts-express-grid/index.php';
360 + include BLOCKSPARE_PLUGIN_DIR . '/inc/latest-post-block/posts-express-grid/post-content.php';
216 361
217 - function blockspare_blocks_register_api_endpoints(){
218 -
219 - $posts_controller = new Aft_Post_Rest_Controller();
220 - $posts_controller->register_routes();
221 -
362 + include BLOCKSPARE_PLUGIN_DIR . '/inc/latest-post-block/posts-carousel-grid/index.php';
363 + include BLOCKSPARE_PLUGIN_DIR . '/inc/latest-post-block/posts-slider/index.php';
222 364
223 - }
365 + include BLOCKSPARE_PLUGIN_DIR . '/inc/post-banner/banner-1/index.php';
366 + include BLOCKSPARE_PLUGIN_DIR . '/inc/post-banner/banner-2/index.php';
367 + include BLOCKSPARE_PLUGIN_DIR . '/inc/post-banner/banner-9/index.php';
368 + include BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/ajax-pagination.php';
369 + include BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/class-post-rest-api.php';
370 + include BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/class-multiauthor-backend.php';
371 + include BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/class-multiauthor-frontend.php';
372 + include BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/tax-category.php';
373 + include BLOCKSPARE_PLUGIN_DIR . 'inc/block-posts-config/class-bs-post.php';
374 + include BLOCKSPARE_PLUGIN_DIR . 'inc/block-banner/frontend-render/post-banner-config.php';
375 + include BLOCKSPARE_PLUGIN_DIR . 'inc/block-banner/frontend-render/post-banner-style.php';
376 + include BLOCKSPARE_PLUGIN_DIR . 'inc/other-block/search/index.php';
377 + include BLOCKSPARE_PLUGIN_DIR . 'inc/latest-post-block/posts-flash/index.php';
378 + include BLOCKSPARE_PLUGIN_DIR . 'inc/other-block/popular-tags/index.php';
379 + include BLOCKSPARE_PLUGIN_DIR . 'inc/page-templates/module.php';
380 + include BLOCKSPARE_PLUGIN_DIR . 'inc/block-banner/frontend-render/post-category-style.php';
381 + }
224 382
383 + public function blockspare_blocks_register_api_endpoints()
384 + {
385 +
386 + $posts_controller = new Aft_Post_Rest_Controller();
387 + $posts_controller->register_routes();
225 388 }
226 - BlockspareInit::get_instance();
389 + }
390 + BlockspareInit::get_instance();
227 391 }
228 -
229 -
230 -