PluginProbe
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs / 5.0.1
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs v5.0.1
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
blockspare / inc / other-block / date-time / index.php

index.php in BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs 5.0.1, at inc/other-block/date-time/index.php

120 lines 5.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!function_exists('blockspare_date_time_style_control')) {
3 function blockspare_date_time_style_control($blockuniqueclass, $attributes)
4 {
5 $inline_css = '';
6 $inline_css .= blockspare_visibility_css($attributes, $blockuniqueclass);
7 $inline_css .= ' .' . $blockuniqueclass . ' .bs-date-time-widget{
8 margin-top:' . $attributes['marginTop'] . 'px;
9 margin-right:' . $attributes['marginRight'] . 'px;
10 margin-bottom:' . $attributes['marginBottom'] . 'px;
11 margin-left:' . $attributes['marginLeft'] . 'px;
12 }';
13
14 $inline_css .= ' .' . $blockuniqueclass . ' .bs-date-wrapper i.bs-date-icon{
15 color:' . $attributes['dateIconColor'] . ';
16 font-size: ' . $attributes['dateIconSize'] . $attributes['dateFontSizeType'] . ';
17 }';
18
19 $inline_css .= ' .' . $blockuniqueclass . ' .bs-date-wrapper time.bs-date-text{
20 color:' . $attributes['dateColor'] . ';
21 }';
22
23 $inline_css .= ' .' . $blockuniqueclass . ' .bs-date-wrapper .bs-date .bs-before-date-text{
24 color:' . $attributes['textBeforeColor'] . ';
25 }';
26
27
28 $inline_css .= ' .' . $blockuniqueclass . ' .bs-date-wrapper .bs-date .bs-after-date-text{
29 color:' . $attributes['textAfterColor'] . ';
30 }';
31
32 $inline_css .= ' .' . $blockuniqueclass . ' .bs-time-wrapper i.bs-time-icon{
33 color:' . $attributes['timeIconColor'] . ';
34 font-size: ' . $attributes['timeIconSize'] . $attributes['dateFontSizeType'] . ';
35 }';
36
37 $inline_css .= ' .' . $blockuniqueclass . ' .bs-time-wrapper span.bs-time-text{
38 color:' . $attributes['timeColor'] . ';
39 }';
40
41 $inline_css .= ' .' . $blockuniqueclass . ' .bs-date-time-widget:not(.date-time-style-1) .bs-time-wrapper{
42 background-color:' . $attributes['bgColor'] . ';
43 }';
44
45 $inline_css .= ' .' . $blockuniqueclass . ' .bs-date-time-widget:not(.date-time-style-1) .bs-date-wrapper{
46 background-color:' . $attributes['bgColor'] . ';
47 }';
48
49 //Font Settings
50
51 $inline_css .= ' .' . $blockuniqueclass . ' .bs-date-text{
52 font-size: ' . $attributes['dateFontSize'] . $attributes['dateFontSizeType'] . ';
53 ' . bscheckFontfamily($attributes['dateFontFamily']) . ';
54 ' . bscheckFontfamilyWeight($attributes['dateFontWeight']) . ';
55
56 }';
57
58 $inline_css .= ' .' . $blockuniqueclass . ' .bs-before-date-text{
59 font-size: ' . $attributes['beforeDateFontSize'] . $attributes['beforeDateFontSizeType'] . ';
60 ' . bscheckFontfamily($attributes['beforeDateFontFamily']) . ';
61 ' . bscheckFontfamilyWeight($attributes['beforeDateFontWeight']) . ';
62 }';
63
64 $inline_css .= ' .' . $blockuniqueclass . ' .bs-after-date-text{
65 font-size: ' . $attributes['afterDateFontSize'] . $attributes['afterDateFontSizeType'] . ';
66 ' . bscheckFontfamily($attributes['afterDateFontFamily']) . ';
67 ' . bscheckFontfamilyWeight($attributes['afterDateFontWeight']) . ';
68 }';
69
70 $inline_css .= ' .' . $blockuniqueclass . ' .bs-time-text{
71 font-size: ' . $attributes['timeFontSize'] . $attributes['timeFontSizeType'] . ';
72 ' . bscheckFontfamily($attributes['timeFontFamily']) . ';
73 ' . bscheckFontfamilyWeight($attributes['timeFontWeight']) . ';
74 }';
75
76
77 $inline_css .= '@media (max-width: 1025px) { ';
78 $inline_css .= ' .' . $blockuniqueclass . ' .bs-date-text{
79 font-size: ' . $attributes['dateFontSizeTablet'] . $attributes['dateFontSizeType'] . ';
80 }';
81
82 $inline_css .= ' .' . $blockuniqueclass . ' .bs-before-date-text{
83 font-size: ' . $attributes['beforeDateFontSizeTablet'] . $attributes['beforeDateFontSizeTablet'] . ';
84 }';
85
86 $inline_css .= ' .' . $blockuniqueclass . ' .bs-after-date-text{
87 font-size: ' . $attributes['afterDateFontSizeTablet'] . $attributes['afterDateFontSizeType'] . ';
88 }';
89 $inline_css .= ' .' . $blockuniqueclass . ' .bs-time-text{
90 font-size: ' . $attributes['timeFontSizeTablet'] . $attributes['timeFontSizeType'] . ';
91 }';
92 $inline_css .= '}';
93
94 $inline_css .= '@media (max-width: 767px) { ';
95 $inline_css .= ' .' . $blockuniqueclass . ' .bs-date-text{
96 font-size: ' . $attributes['dateFontSizeMobile'] . $attributes['dateFontSizeType'] . ';
97 }';
98
99 $inline_css .= ' .' . $blockuniqueclass . ' .bs-before-date-text{
100 font-size: ' . $attributes['beforeDateFontSizeMobile'] . $attributes['beforeDateFontSizeType'] . ';
101 }';
102
103 $inline_css .= ' .' . $blockuniqueclass . ' .bs-after-date-text{
104 font-size: ' . $attributes['afterDateFontSizeMobile'] . $attributes['afterDateFontSizeType'] . ';
105 }';
106
107 $inline_css .= ' .' . $blockuniqueclass . ' .bs-time-text{
108 font-size: ' . $attributes['timeFontSizeMobile'] . $attributes['timeFontSizeType'] . ';
109 }';
110 $inline_css .= '}';
111
112
113 if (!empty($inline_css)) {
114 wp_register_style('bs-post-date-time', false);
115 wp_enqueue_style('bs-post-date-time');
116 wp_add_inline_style('bs-post-date-time', blockspare_minify_css($inline_css));
117 }
118 }
119 }
120