| @@ -109,8 +109,12 @@ | ||
| 109 | 109 | $block_post_wrap = $blockuniqueclass . ' blockspare-posts-block-post-wrap'; |
| 110 | 110 | $count = 0; |
| 111 | 111 | $layout_class = 'bs-flash-wrap flash-layout ' . $attributes['layoutStyle']; |
| 112 | 112 | |
| 113 | + if($attributes['fixedWidth']) { | |
| 114 | + $layout_class .= ' has-fixed-width'; | |
| 115 | + } | |
| 116 | + | |
| 113 | 117 | $exclusive_posts = 'bs-exclusive-posts blockspare-hover-item'; |
| 114 | 118 | if($attributes['border']){ |
| 115 | 119 | $exclusive_posts .= ' bs-border-enabled bs-' . $attributes['borderStyle']; |
| 116 | 120 | } else { |
| @@ -133,25 +137,25 @@ | ||
| 133 | 137 | <section class="<?php echo esc_attr($block_post_wrap);?>"> |
| 134 | 138 | <div class="<?php echo esc_attr($layout_class);?>"> |
| 135 | 139 | <div class="<?php echo esc_attr($exclusive_posts);?>"> |
| 136 | 140 | <div class="bs-exclusive-now"> |
| 137 | - <?php if($attributes['exclusiveSubtitle']){?> | |
| 138 | - <span class="bs-exclusive-news-title"><?php echo esc_html($attributes['exclusiveSubtitleText']); ?></span> | |
| 139 | - <?php }?> | |
| 141 | + <?php if($attributes['exclusiveSubtitle']){ ?> | |
| 142 | + <span class="bs-exclusive-news-title"><span><?php echo esc_html($attributes['exclusiveSubtitleText']); ?></span></span> | |
| 143 | + <?php } ?> | |
| 140 | 144 | <div class="bs-exclusive-now-txt-animation-wrap"> |
| 141 | - <?php if($attributes['spinner']){?> | |
| 145 | + <?php if($attributes['spinner']){ ?> | |
| 142 | 146 | <span class="<?php echo esc_attr($flash_spiner_class); ?>"> |
| 143 | - <?php if($attributes['spinnerOption'] == 'spinner-option-1') {?> | |
| 147 | + <?php if($attributes['spinnerOption'] == 'spinner-option-1') { ?> | |
| 144 | 148 | <div class="ring"></div> |
| 145 | 149 | <div class="ring"></div> |
| 146 | 150 | <div class="ring"></div> |
| 147 | 151 | <div class="ring"></div> |
| 148 | 152 | <div class="ring"></div> |
| 149 | - <?php } else {?> | |
| 153 | + <?php } else { ?> | |
| 150 | 154 | <i class="<?php echo esc_attr($spinner_icon);?>"></i> |
| 151 | - <?php }?> | |
| 155 | + <?php } ?> | |
| 152 | 156 | </span> |
| 153 | - <?php }?> | |
| 157 | + <?php } ?> | |
| 154 | 158 | <span class="bs-exclusive-texts-wrapper"> |
| 155 | 159 | <?php echo $attributes['exclusiveText'] != "" ? $attributes['exclusiveText'] : "Breaking News";?> |
| 156 | 160 | </span> |
| 157 | 161 | </div> |
| @@ -180,19 +184,19 @@ | ||
| 180 | 184 | <?php |
| 181 | 185 | |
| 182 | 186 | if (!empty($attributes['imageSize'])) { |
| 183 | 187 | $post_thumb_size = 'thumbnail '; |
| 184 | - }?> | |
| 188 | + } ?> | |
| 185 | 189 | <a href="<?php echo esc_url(get_permalink($post_id));?>" rel="bookmark" aria-hidden="true" |
| 186 | 190 | tabindex="-1"> |
| 187 | 191 | <span class="bs-circle-marq"> |
| 188 | - <?php if($attributes['enableCount']){?> | |
| 192 | + <?php if($attributes['enableCount']){ ?> | |
| 189 | 193 | <span class="bs-trending-no"><?php echo esc_html( $count );?></span> |
| 190 | - <?php }?> | |
| 194 | + <?php } ?> | |
| 191 | 195 | <?php |
| 192 | 196 | if(has_post_thumbnail($post_id)){ |
| 193 | 197 | echo wp_kses_post(wp_get_attachment_image($post_thumb_id, $post_thumb_size)); |
| 194 | - }else{?> | |
| 198 | + }else{ ?> | |
| 195 | 199 | <div class="bs-no-thumbnail-img"> </div> |
| 196 | 200 | <?php } ?> |
| 197 | 201 | </span> |
| 198 | 202 | <span class="bs-post-title"> |
| @@ -207,9 +211,9 @@ | ||
| 207 | 211 | ?> |
| 208 | 212 | </span> |
| 209 | 213 | </a> |
| 210 | 214 | </h4> |
| 211 | - <?php }?> | |
| 215 | + <?php } ?> | |
| 212 | 216 | </div> |
| 213 | 217 | <div aria-hidden="true" class="bs-marquee-wrapper"> |
| 214 | 218 | <?php while ($grid_query->have_posts()) { |
| 215 | 219 | $grid_query->the_post(); |
| @@ -232,19 +236,19 @@ | ||
| 232 | 236 | <?php |
| 233 | 237 | |
| 234 | 238 | if (!empty($attributes['imageSize'])) { |
| 235 | 239 | $post_thumb_size = 'thumbnail '; |
| 236 | - }?> | |
| 240 | + } ?> | |
| 237 | 241 | <a href="<?php echo esc_url(get_permalink($post_id));?>" rel="bookmark" aria-hidden="true" |
| 238 | 242 | tabindex="-1"> |
| 239 | 243 | <span class="bs-circle-marq"> |
| 240 | - <?php if($attributes['enableCount']){?> | |
| 244 | + <?php if($attributes['enableCount']){ ?> | |
| 241 | 245 | <span class="bs-trending-no"><?php echo esc_html( $count );?></span> |
| 242 | - <?php }?> | |
| 246 | + <?php } ?> | |
| 243 | 247 | <?php |
| 244 | 248 | if(has_post_thumbnail($post_id)){ |
| 245 | 249 | echo wp_kses_post(wp_get_attachment_image($post_thumb_id, $post_thumb_size)); |
| 246 | - }else{?> | |
| 250 | + }else{ ?> | |
| 247 | 251 | <div class="bs-no-thumbnail-img"> </div> |
| 248 | 252 | <?php } ?> |
| 249 | 253 | </span> |
| 250 | 254 | <span class="bs-post-title"> |
| @@ -259,9 +263,9 @@ | ||
| 259 | 263 | ?> |
| 260 | 264 | </span> |
| 261 | 265 | </a> |
| 262 | 266 | </h4> |
| 263 | - <?php }?> | |
| 267 | + <?php } ?> | |
| 264 | 268 | </div> |
| 265 | 269 | </div> |
| 266 | 270 | </div> |
| 267 | 271 | </div> |
| @@ -345,8 +349,13 @@ | ||
| 345 | 349 | $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides .marquee .bs-marquee-wrapper{ |
| 346 | 350 | animation-duration:' . $attributes['animationSpeed'] . 's; |
| 347 | 351 | }'; |
| 348 | 352 | |
| 353 | + //post-widht | |
| 354 | + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap.has-fixed-width h4.bs-post-title{ | |
| 355 | + width:' . $attributes['postWidth'] . 'px; | |
| 356 | + }'; | |
| 357 | + | |
| 349 | 358 | //Title color |
| 350 | 359 | $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a .bs-post-title{ |
| 351 | 360 | color:' . $attributes['postTitleColor'] . '; |
| 352 | 361 | }'; |
| @@ -395,8 +404,11 @@ | ||
| 395 | 404 | margin-top:' . $attributes['marginTop'] . 'px; |
| 396 | 405 | margin-right:' . $attributes['marginRight'] . 'px; |
| 397 | 406 | margin-bottom:' . $attributes['marginBottom'] . 'px; |
| 398 | 407 | margin-left:' . $attributes['marginLeft'] . 'px; |
| 408 | + }'; | |
| 409 | + | |
| 410 | + $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-slides{ | |
| 399 | 411 | padding-top:' . $attributes['paddingTop'] . 'px; |
| 400 | 412 | padding-right:' . $attributes['paddingRight'] . 'px; |
| 401 | 413 | padding-bottom:' . $attributes['paddingBottom'] . 'px; |
| 402 | 414 | padding-left:' . $attributes['paddingLeft'] . 'px; |
| @@ -415,15 +427,15 @@ | ||
| 415 | 427 | |
| 416 | 428 | $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a .bs-post-title{ |
| 417 | 429 | font-size: ' . $attributes['postTitleFontSize'] . $attributes['titleFontSizeType'] . '; |
| 418 | 430 | '.bscheckFontfamily($attributes['titleFontFamily']).'; |
| 419 | - font-weight: ' . $attributes['titleFontWeight'] . '; | |
| 431 | + '.bscheckFontfamilyWeight($attributes['titleFontWeight']).'; | |
| 420 | 432 | }'; |
| 421 | 433 | |
| 422 | 434 | $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-now .bs-exclusive-now-txt-animation-wrap .bs-exclusive-texts-wrapper{ |
| 423 | 435 | font-size: ' . $attributes['exclusiveFontSize'] . $attributes['exclusiveFontSizeType'] . '; |
| 424 | 436 | '.bscheckFontfamily($attributes['exclusiveFontFamily']).'; |
| 425 | - font-weight: ' . $attributes['exclusiveFontWeight'] . '; | |
| 437 | + '.bscheckFontfamilyWeight($attributes['exclusiveFontWeight']).'; | |
| 426 | 438 | }'; |
| 427 | 439 | |
| 428 | 440 | $block_content .= '@media (max-width: 1025px) { '; |
| 429 | 441 | $block_content .= ' .' . $blockuniqueclass . ' .bs-flash-wrap .bs-exclusive-posts .bs-exclusive-slides a .bs-post-title{ |