PluginProbe
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs / 2.6.6
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs v2.6.6
5.0.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 All 39 releases
← All changes | inc/latest-post-block/posts-flash/index.php +390 -95 5.0.1 → 2.6.6 View file →
@@ -1,95 +1,407 @@
1 1 <?php
2 -if (!function_exists('latest_posts_style_control_flash')) {
3 - function latest_posts_style_control_flash($blockuniqueclass, $attributes)
4 - {
2 + if(!function_exists('blockspare_flash_render_block')){
3 + function blockspare_flash_render_block($attributes)
4 + {
5 + ob_start();
6 + $unq_class = mt_rand(100000,999999);
7 + $blockuniqueclass = '';
8 +
9 + if(!empty($attributes['uniqueClass'])){
10 + $blockuniqueclass = $attributes['uniqueClass'];
11 + }else{
12 + $blockuniqueclass = 'blockspare-posts-block-list-'.$unq_class;
13 + }
14 +
15 +
16 +
17 + if ( isset( $attributes['categories'] ) && ! empty( $attributes['categories'] ) && is_array( $attributes['categories'] ) ) {
18 + $categories = array();
19 + $i = 1;
20 + foreach ( $attributes['categories'] as $key => $value ) {
21 + $categories[] = $value['value'];
22 + }
23 + } else {
24 + $categories = array();
25 + }
26 +
27 + if ( isset( $attributes['tags'] ) && ! empty( $attributes['tags'] ) && is_array( $attributes['tags'] ) ) {
28 + $tags = array();
29 + $i = 1;
30 + foreach ( $attributes['tags'] as $key => $value ) {
31 + $tags[] = $value['value'];
32 + }
33 + } else {
34 + $tags = array();
35 + }
36 +
37 + /* Setup the query */
38 +
39 + $query_args = array(
40 + 'posts_per_page' => $attributes['postsToShow'],
41 + 'post_status' => 'publish',
42 + 'order' => $attributes['order'],
43 + 'orderby' => $attributes['orderBy'],
44 + 'offset' => $attributes['offset'],
45 + 'post_type' => $attributes['postType'],
46 + 'ignore_sticky_posts' => 1,
47 + );
48 +
49 + if($attributes['taxType'] =='category'){
50 + $query_args['category__in'] =$categories;
51 +
52 + }
53 + if($attributes['taxType'] =='post_tag'){
54 + $query_args['tag__in'] =$tags;
55 +
56 + }
57 +
58 +
59 + if($attributes['taxType'] !='category' && $attributes['taxType'] != 'post_tag'){
60 +
61 + $tax_type = $attributes['taxType'];
62 + if ( $tax_type ) {
63 + $query_args['tax_query'][] = array(
64 + 'taxonomy' => ( isset( $tax_type ) ) ? $tax_type : 'category',
65 + 'field' => 'id',
66 + 'terms' => $categories,
67 + 'operator' => 'IN' ,
68 + );
69 + }
70 + }
5 71
72 + $grid_query = new WP_Query($query_args);
73 +
74 +
75 +
76 + $responsivelayoutTab = 1;
77 + $responsivelayoutMobile = 1;
78 + $verticals = false;
6 79
7 - // Build CSS separately
8 - $inline_css = '';
9 - $inline_css .= blockspare_visibility_css($attributes, $blockuniqueclass);
10 - //post-flash-background
11 - if ($attributes['background']) {
12 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts{
80 + if($attributes['carouselType']=='vertical'){
81 + $verticals = true;
82 + }
83 +
84 +
85 +
86 +
87 +
88 +
89 + /* Start the loop */
90 + if ($grid_query->have_posts()) {
91 + $alignclass = blockspare_checkalignment($attributes['align']);
92 + /* Build the block classes */
93 + $class = 'align'.$alignclass;
94 +
95 + if (isset($attributes['class'])) {
96 + $class .= ' ' . $attributes['class'];
97 + }
98 + if( $attributes['animation']){
99 + $class .= ' blockspare-block-animation ' . $attributes['animation'];
100 + }
101 +
102 +
103 +
104 +
105 + //$list_layout_class = $attributes['trending'];
106 + $listgridClass = 'blockspare-posts-block-is-carousel' ;
107 +
108 + /* Layout orientation class */
109 + $block_post_wrap = $blockuniqueclass . ' blockspare-posts-block-post-wrap';
110 + $count = 0;
111 + $layout_class = 'bs-flash-wrap flash-layout ' . $attributes['layoutStyle'];
112 +
113 + if($attributes['fixedWidth']) {
114 + $layout_class .= ' has-fixed-width';
115 + }
116 +
117 + $exclusive_posts = 'bs-exclusive-posts blockspare-hover-item';
118 + if($attributes['border']){
119 + $exclusive_posts .= ' bs-border-enabled bs-' . $attributes['borderStyle'];
120 + } else {
121 + $exclusive_posts .= ' bs-border-disabled';
122 + }
123 + $flash_spiner_class = 'bs-spinner ';
124 + if($attributes['spinnerOption']=='spinner-option-1'){
125 + $flash_spiner_class .= $attributes['spinnerStyle'];
126 + }else{
127 + $flash_spiner_class .= $attributes['animationStyle'];
128 + }
129 + $spinner_icon = $attributes['spinnerIcon'];
130 + $marquee_class = 'marquee bs-flash-side ' . $attributes['direction'];
131 + if($attributes['pauseOnHover']){
132 + $marquee_class .= ' pause-on-hover';
133 + }
134 + ?>
135 +
136 +<div class="<?php echo esc_attr($class);?> <?php echo esc_attr($attributes['blockHoverEffect']) ?>">
137 + <section class="<?php echo esc_attr($block_post_wrap);?>">
138 + <div class="<?php echo esc_attr($layout_class);?>">
139 + <div class="<?php echo esc_attr($exclusive_posts);?>">
140 + <div class="bs-exclusive-now">
141 + <?php if($attributes['exclusiveSubtitle']){ ?>
142 + <span class="bs-exclusive-news-title"><span><?php echo esc_html($attributes['exclusiveSubtitleText']); ?></span></span>
143 + <?php } ?>
144 + <div class="bs-exclusive-now-txt-animation-wrap">
145 + <?php if($attributes['spinner']){ ?>
146 + <span class="<?php echo esc_attr($flash_spiner_class); ?>">
147 + <?php if($attributes['spinnerOption'] == 'spinner-option-1') { ?>
148 + <div class="ring"></div>
149 + <div class="ring"></div>
150 + <div class="ring"></div>
151 + <div class="ring"></div>
152 + <div class="ring"></div>
153 + <?php } else { ?>
154 + <i class="<?php echo esc_attr($spinner_icon);?>"></i>
155 + <?php } ?>
156 + </span>
157 + <?php } ?>
158 + <span class="bs-exclusive-texts-wrapper">
159 + <?php echo $attributes['exclusiveText'] != "" ? $attributes['exclusiveText'] : "Breaking News";?>
160 + </span>
161 + </div>
162 + </div>
163 + <div class="bs-exclusive-slides">
164 + <div class="<?php echo esc_attr($marquee_class);?>">
165 + <div class="bs-marquee-wrapper">
166 + <?php while ($grid_query->have_posts()) {
167 + $grid_query->the_post();
168 +
169 + $count++;
170 +
171 + /* Setup the post ID */
172 + $post_id = get_the_ID();
173 +
174 + /* Setup the featured image ID */
175 + $post_thumb_id = get_post_thumbnail_id($post_id);
176 +
177 +
178 + /* Setup the post classes */
179 + $post_classes = 'bs-post-title ';
180 +
181 + ?>
182 +
183 + <h4 class="<?php echo esc_attr($post_classes) ?>">
184 + <?php
185 +
186 + if (!empty($attributes['imageSize'])) {
187 + $post_thumb_size = 'thumbnail ';
188 + } ?>
189 + <a href="<?php echo esc_url(get_permalink($post_id));?>" rel="bookmark" aria-hidden="true"
190 + tabindex="-1">
191 + <span class="bs-circle-marq">
192 + <?php if($attributes['enableCount']){ ?>
193 + <span class="bs-trending-no"><?php echo esc_html( $count );?></span>
194 + <?php } ?>
195 + <?php
196 + if(has_post_thumbnail($post_id)){
197 + echo wp_kses_post(wp_get_attachment_image($post_thumb_id, $post_thumb_size));
198 + }else{ ?>
199 + <div class="bs-no-thumbnail-img"> </div>
200 + <?php } ?>
201 + </span>
202 + <span class="bs-post-title">
203 + <?php
204 + $title = get_the_title($post_id);
205 +
206 + if (!$title) {
207 + $title = __('Untitled', 'blockspare');
208 + }
209 +
210 + echo esc_html($title);
211 + ?>
212 + </span>
213 + </a>
214 + </h4>
215 + <?php } ?>
216 + </div>
217 + <div aria-hidden="true" class="bs-marquee-wrapper">
218 + <?php while ($grid_query->have_posts()) {
219 + $grid_query->the_post();
220 +
221 + $count++;
222 +
223 + /* Setup the post ID */
224 + $post_id = get_the_ID();
225 +
226 + /* Setup the featured image ID */
227 + $post_thumb_id = get_post_thumbnail_id($post_id);
228 +
229 +
230 + /* Setup the post classes */
231 + $post_classes = 'bs-post-title ';
232 +
233 + ?>
234 +
235 + <h4 class="<?php echo esc_attr($post_classes) ?>">
236 + <?php
237 +
238 + if (!empty($attributes['imageSize'])) {
239 + $post_thumb_size = 'thumbnail ';
240 + } ?>
241 + <a href="<?php echo esc_url(get_permalink($post_id));?>" rel="bookmark" aria-hidden="true"
242 + tabindex="-1">
243 + <span class="bs-circle-marq">
244 + <?php if($attributes['enableCount']){ ?>
245 + <span class="bs-trending-no"><?php echo esc_html( $count );?></span>
246 + <?php } ?>
247 + <?php
248 + if(has_post_thumbnail($post_id)){
249 + echo wp_kses_post(wp_get_attachment_image($post_thumb_id, $post_thumb_size));
250 + }else{ ?>
251 + <div class="bs-no-thumbnail-img"> </div>
252 + <?php } ?>
253 + </span>
254 + <span class="bs-post-title">
255 + <?php
256 + $title = get_the_title($post_id);
257 +
258 + if (!$title) {
259 + $title = __('Untitled', 'blockspare');
260 + }
261 +
262 + echo esc_html($title);
263 + ?>
264 + </span>
265 + </a>
266 + </h4>
267 + <?php } ?>
268 + </div>
269 + </div>
270 + </div>
271 + </div>
272 + </div>
273 + </section>
274 +</div>
275 +<?php wp_reset_postdata();
276 + $data_content = latest_posts_style_control_flash($blockuniqueclass ,$attributes);
277 + $data_content .= ob_get_clean();
278 + return $data_content;
279 + }
280 + }
281 +}
282 +
283 + /**
284 + * Registers the post grid block on server
285 + */
286 + if(!function_exists('blockspare_flash_register_block_core')){
287 + function blockspare_flash_register_block_core()
288 + {
289 +
290 + if (!function_exists('register_block_type')) {
291 + return;
292 + }
293 +
294 +
295 + ob_start();
296 + include BLOCKSPARE_PLUGIN_DIR . 'inc/latest-post-block/posts-flash/block.json';
297 +
298 + $metadata = json_decode(ob_get_clean(), true);
299 +
300 +
301 + /* Block attributes */
302 + register_block_type(
303 + 'blockspare/latest-posts-flash',
304 + array(
305 + 'attributes' =>$metadata['attributes'],
306 + 'render_callback' => 'blockspare_flash_render_block',
307 + )
308 + );
309 + }
310 +
311 + add_action('init', 'blockspare_flash_register_block_core');
312 +}
313 +
314 +
315 +
316 +
317 + if(!function_exists('latest_posts_style_control_flash')){
318 + function latest_posts_style_control_flash($blockuniqueclass ,$attributes)
319 + {
320 +
321 + $boxshadowcss = '';
322 +
323 +
324 +
325 +
326 +
327 + $block_content = '';
328 + $block_content .= '<style type="text/css">';
329 +
330 +
331 + //post-flash-background
332 + if($attributes['background']) {
333 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts{
13 334 background-color:' . $attributes['backGroundColor'] . ';
14 335 }';
15 - }
336 + }
16 337
17 - //post-flash-border-radius
18 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts{
338 + //post-flash-border-radius
339 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts, .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-now-txt-animation-wrap, .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides{
19 340 border-radius:' . $attributes['borderRadius'] . 'px;
20 341 }';
21 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-now-txt-animation-wrap{
22 - border-radius:' . $attributes['borderRadius'] . 'px;
23 - }';
24 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides{
25 - border-radius:' . $attributes['borderRadius'] . 'px;
26 - }';
27 342
28 - //post-image-border-radius
29 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides .bs-circle-marq{
343 + //post-image-border-radius
344 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides .bs-circle-marq{
30 345 border-radius:' . $attributes['imgBorderRadius'] . 'px;
31 346 }';
32 347
33 - //post-flash-animation-speed
34 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides .bs-marquee .bs-marquee-wrapper{
348 + //post-flash-animation-speed
349 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides .marquee .bs-marquee-wrapper{
35 350 animation-duration:' . $attributes['animationSpeed'] . 's;
36 351 }';
37 352
38 - //post-widht
39 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap.has-fixed-width h2.bs-post-title{
353 + //post-widht
354 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap.has-fixed-width h4.bs-post-title{
40 355 width:' . $attributes['postWidth'] . 'px;
41 356 }';
42 357
43 - //Title color
44 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a .bs-post-title{
358 + //Title color
359 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a .bs-post-title{
45 360 color:' . $attributes['postTitleColor'] . ';
46 361 }';
47 362
48 - //Title hover color
49 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a:hover .bs-post-title{
363 + //Title hover color
364 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a:hover .bs-post-title{
50 365 color:' . $attributes['titleOnHoverColor'] . ';
51 366 }';
52 367
53 - //Exclusive News color and background
54 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap{
368 + //Exclusive News color and background
369 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap{
55 370 color:' . $attributes['newsColor'] . ';
56 371 background-color: ' . $attributes['newsBgColor'] . ';
57 372 }';
58 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap.flash-style-2 .bs-exclusive-posts .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap::after{
373 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap.flash-style-2 .bs-exclusive-posts .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap::after{
59 374 border-left-color:' . $attributes['newsBgColor'] . ';
60 375 }';
61 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap.flash-style-3 .bs-exclusive-posts .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap::after{
376 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap.flash-style-3 .bs-exclusive-posts .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap::after, .bs-flash-wrap.flash-style-4 .bs-exclusive-posts .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap::after{
62 377 background-color:' . $attributes['newsBgColor'] . ';
63 378 }';
64 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap.flash-style-4 .bs-exclusive-posts .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap::after{
65 - background-color:' . $attributes['newsBgColor'] . ';
66 - }';
67 379
68 - //Border
69 - if ($attributes['border']) {
70 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts{
380 + //Border
381 + if($attributes['border']) {
382 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts{
71 383 border-width:' . $attributes['borderWidth'] . 'px;
72 384 border-color:' . $attributes['borderColor'] . ';
73 385 }';
74 - }
386 + }
75 387
76 - //Exclusive Subtitle color and background
77 - if ($attributes['exclusiveSubtitle']) {
78 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-now > span{
388 + //Exclusive Subtitle color and background
389 + if($attributes['exclusiveSubtitle']) {
390 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-now > span{
79 391 color:' . $attributes['exclusiveColor'] . ';
80 392 background-color: ' . $attributes['exclusiveBgColor'] . ';
81 393 }';
82 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-now > span::before{
394 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-now > span::before{
83 395 border-top-color:' . $attributes['exclusiveBgColor'] . ';
84 396 }';
85 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-now > span::after{
397 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-now > span::after{
86 398 border-bottom-color:' . $attributes['exclusiveBgColor'] . ';
87 399 }';
88 - }
400 + }
89 401
90 - //Block Gaps
91 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts{
402 + //Block Gaps
403 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts{
92 404 margin-top:' . $attributes['marginTop'] . 'px;
93 405 margin-right:' . $attributes['marginRight'] . 'px;
94 406 margin-bottom:' . $attributes['marginBottom'] . 'px;
95 407 margin-left:' . $attributes['marginLeft'] . 'px;
@@ -94,9 +406,9 @@
94 406 margin-bottom:' . $attributes['marginBottom'] . 'px;
95 407 margin-left:' . $attributes['marginLeft'] . 'px;
96 408 }';
97 409
98 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-slides{
410 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-slides{
99 411 padding-top:' . $attributes['paddingTop'] . 'px;
100 412 padding-right:' . $attributes['paddingRight'] . 'px;
101 413 padding-bottom:' . $attributes['paddingBottom'] . 'px;
102 414 padding-left:' . $attributes['paddingLeft'] . 'px;
@@ -101,68 +413,51 @@
101 413 padding-bottom:' . $attributes['paddingBottom'] . 'px;
102 414 padding-left:' . $attributes['paddingLeft'] . 'px;
103 415 }';
104 416
105 - // Post Number Color
106 - if ($attributes['enableCount']) {
107 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides .bs-marquee h2.bs-post-title a .bs-circle-marq .bs-trending-no{
417 + // Post Number Color
418 + if($attributes['enableCount']){
419 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides .marquee h4.bs-post-title a .bs-circle-marq .bs-trending-no{
108 420 color: ' . $attributes['countColor'] . ';
109 421 }';
110 - }
111 -
112 - //Font Settings
113 -
114 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a .bs-post-title{
422 + }
423 +
424 +
425 +
426 + //Font Settings
427 +
428 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a .bs-post-title{
115 429 font-size: ' . $attributes['postTitleFontSize'] . $attributes['titleFontSizeType'] . ';
116 - ' . bscheckFontfamily($attributes['titleFontFamily']) . ';
117 - ' . bscheckFontfamilyWeight($attributes['titleFontWeight']) . ';
118 - line-height: ' . $attributes['postTitleLineHeight'] . ';
430 + '.bscheckFontfamily($attributes['titleFontFamily']).';
431 + '.bscheckFontfamilyWeight($attributes['titleFontWeight']).';
119 432 }';
120 433
121 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap .bs-exclusive-texts-wrapper{
434 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap .bs-exclusive-texts-wrapper{
122 435 font-size: ' . $attributes['exclusiveFontSize'] . $attributes['exclusiveFontSizeType'] . ';
123 - ' . bscheckFontfamily($attributes['exclusiveFontFamily']) . ';
124 - ' . bscheckFontfamilyWeight($attributes['exclusiveFontWeight']) . ';
436 + '.bscheckFontfamily($attributes['exclusiveFontFamily']).';
437 + '.bscheckFontfamilyWeight($attributes['exclusiveFontWeight']).';
125 438 }';
126 -
127 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-now .bs-exclusive-news-title{
128 - font-size: ' . $attributes['exclusiveSubtitleFontSize'] . $attributes['exclusiveSubtitleFontSizeType'] . ';
129 - ' . bscheckFontfamily($attributes['exclusiveSubtitleFontFamily']) . ';
130 - ' . bscheckFontfamilyWeight($attributes['exclusiveSubtitleFontWeight']) . ';
131 - }';
132 -
133 - $inline_css .= '@media (max-width: 1025px) { ';
134 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a .bs-post-title{
439 +
440 + $block_content .= '@media (max-width: 1025px) { ';
441 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a .bs-post-title{
135 442 font-size: ' . $attributes['titleFontSizeTablet'] . $attributes['titleFontSizeType'] . ';
136 443 }';
137 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap .bs-exclusive-texts-wrapper{
444 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap .bs-exclusive-texts-wrapper{
138 445 font-size: ' . $attributes['exclusiveFontSizeTablet'] . $attributes['exclusiveFontSizeType'] . ';
139 446 }';
140 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-now .bs-exclusive-news-title{
141 - font-size: ' . $attributes['exclusiveSubtitleFontSizeTablet'] . $attributes['exclusiveSubtitleFontSizeType'] . ';
142 - }';
143 - $inline_css .= '}';
144 -
145 - $inline_css .= '@media (max-width: 767px) { ';
146 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a .bs-post-title{
447 + $block_content .= '}';
448 +
449 + $block_content .= '@media (max-width: 767px) { ';
450 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a .bs-post-title{
147 451 font-size: ' . $attributes['titleFontSizeMobile'] . $attributes['titleFontSizeType'] . ';
148 452 }';
149 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap .bs-exclusive-texts-wrapper{
453 + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap .bs-exclusive-texts-wrapper{
150 454 font-size: ' . $attributes['exclusiveFontSizeMobile'] . $attributes['exclusiveFontSizeType'] . ';
151 455 }';
152 - $inline_css .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-now .bs-exclusive-news-title{
153 - font-size: ' . $attributes['exclusiveSubtitleFontSizeMobile'] . $attributes['exclusiveSubtitleFontSizeType'] . ';
154 - }';
155 - $inline_css .= '}';
156 -
157 - // $block_content .= blockspare_minify_css($inline_css);
158 -
159 - // $block_content .= '</style>';
160 - // return $block_content;
161 -
162 - if (!empty($inline_css)) {
163 - wp_register_style('bs-flash-inline', false);
164 - wp_enqueue_style('bs-flash-inline');
165 - wp_add_inline_style('bs-flash-inline', blockspare_minify_css($inline_css));
456 + $block_content .= '}';
457 +
458 + $block_content .= '</style>';
459 + return $block_content;
166 460 }
167 - }
168 461 }
462 +
463 +