PluginProbe
Post Grid Gutenberg Blocks – PostX / 5.1.0
Post Grid Gutenberg Blocks – PostX v5.1.0
5.1.1 5.1.0 5.0.41 5.0.39 5.0.38 5.0.37 5.0.36 5.0.35 5.0.34 5.0.33 5.0.32 5.0.31 5.0.30 5.0.29 5.0.28 5.0.27 5.0.26 5.0.25 5.0.23 5.0.24 5.0.22 5.0.21 5.0.20 5.0.19 5.0.18 All 240 releases
← All changes | blocks/Dark_Light.php +77 -79 5.0.34 → 5.1.0 View file →
@@ -36,98 +36,96 @@
36 36 }
37 37
38 38 public function content( $attr ) {
39 39
40 - $is_visible = false;
41 - if ( isset( $attr['blockPubDate'] ) && $attr['blockPubDate'] != 'empty' ) {
42 - $is_visible = ultimate_post()->is_pro_feature_visible( $attr['blockPubDate'] );
43 - }
40 + $attr = wp_parse_args( $attr, $this->get_attributes() );
44 41
45 - $is_active = ultimate_post()->is_lc_active();
42 + $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : '';
43 + $attr['align'] = isset( $attr['align'] ) && $attr['align'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['align'] ) : '';
44 + $layout = isset( $attr['layout'] ) ? sanitize_html_class( $attr['layout'] ) : 'layout1';
45 + $reverseSwitcher = isset( $attr['reverseSwitcher'] ) && $attr['reverseSwitcher'] ? 'ultp-dl-reverse' : '';
46 + $enableText = isset( $attr['enableText'] ) ? $attr['enableText'] == true : false;
47 + $textAppears = isset( $attr['textAppears'] ) ? sanitize_html_class( $attr['textAppears'] ) : 'both';
48 + $iconType = isset( $attr['iconType'] ) ? sanitize_html_class( $attr['iconType'] ) : 'solid';
49 + $iconSize = isset( $attr['iconSize'] ) ? sanitize_html_class( $attr['iconSize'] ) : '24';
46 50
47 - if ( $is_active || $is_visible ) {
48 - $attr = wp_parse_args( $attr, $this->get_attributes() );
51 + // Free ships layout1 only. Further layouts are added through these filters by PostX Pro.
52 + if ( ! in_array( $layout, (array) apply_filters( 'ultp_dark_light_layouts', array( 'layout1' ) ), true ) ) {
53 + $layout = 'layout1';
54 + }
49 55
50 - $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : '';
51 - $attr['align'] = isset( $attr['align'] ) && $attr['align'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['align'] ) : '';
52 - $layout = isset( $attr['layout'] ) ? sanitize_html_class( $attr['layout'] ) : 'layout1';
53 - $reverseSwitcher = isset( $attr['reverseSwitcher'] ) && $attr['reverseSwitcher'] ? 'ultp-dl-reverse' : '';
54 - $enableText = isset( $attr['enableText'] ) ? $attr['enableText'] == true : false;
55 - $textAppears = isset( $attr['textAppears'] ) ? sanitize_html_class( $attr['textAppears'] ) : 'both';
56 - $iconType = isset( $attr['iconType'] ) ? sanitize_html_class( $attr['iconType'] ) : 'solid';
57 - $iconSize = isset( $attr['iconSize'] ) ? sanitize_html_class( $attr['iconSize'] ) : '24';
56 + $allowed_html_tags = ultimate_post()->ultp_allowed_html_tags();
57 + $lightText = isset( $attr['lightText'] ) ? wp_kses( $attr['lightText'], $allowed_html_tags ) : 'Light Mode';
58 + $darkText = isset( $attr['darkText'] ) ? wp_kses( $attr['darkText'], $allowed_html_tags ) : 'Dark Mode';
59 + $dlMode = isset( $_COOKIE['ultplocalDLMode'] ) ? sanitize_key( wp_unslash( $_COOKIE['ultplocalDLMode'] ) ) : ultimate_post()->get_dl_mode();
60 + $sideText = (bool) apply_filters( 'ultp_dark_light_side_text', $enableText, $layout );
61 + $inner_allowed = ultimate_post()->ultp_allowed_html_tags( array( 'div' => array( 'class' => true ) ) );
62 + $lightInner = apply_filters( 'ultp_dark_light_inner_text', '', 'light', $layout, $lightText );
63 + $darkInner = apply_filters( 'ultp_dark_light_inner_text', '', 'dark', $layout, $darkText );
58 64
59 - $allowed_html_tags = ultimate_post()->ultp_allowed_html_tags();
60 - $lightText = isset( $attr['lightText'] ) ? wp_kses( $attr['lightText'], $allowed_html_tags ) : 'Light Mode';
61 - $darkText = isset( $attr['darkText'] ) ? wp_kses( $attr['darkText'], $allowed_html_tags ) : 'Dark Mode';
62 - $dlMode = isset( $_COOKIE['ultplocalDLMode'] ) ? $_COOKIE['ultplocalDLMode'] : ultimate_post()->get_dl_mode();
65 + $dlIcons = array();
66 + $dlIcons['moon'] = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M22 14.27A10.14 10.14 0 1 1 9.73 2 8.84 8.84 0 0 0 22 14.27Z"/></svg>';
67 + $dlIcons['moon_line'] = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M8.17 4.53A9.54 9.54 0 0 0 19.5 15.69a8.26 8.26 0 0 1-7.76 4.29 8.36 8.36 0 0 1-7.71-7.7 8.23 8.23 0 0 1 4.15-7.76m1-2.52c-.16 0-.32.03-.48.09a10.28 10.28 0 0 0 3.56 19.9c4.47 0 8.27-2.85 9.67-6.84a1.36 1.36 0 0 0-1.27-1.82c-.15 0-.31.03-.47.1a7.48 7.48 0 0 1-3.41.43 7.59 7.59 0 0 1-6.33-10.04A1.36 1.36 0 0 0 9.17 2Z" /></svg>';
68 + $dlIcons['sun'] = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><g><path d="M12 18.36a6.36 6.36 0 1 0 0-12.72 6.36 6.36 0 0 0 0 12.72ZM12.98.96V2.8c0 .53-.43.95-.97.95h-.02a.96.96 0 0 1-.97-.95V.96c0-.53.43-.96.96-.96h.05c.53 0 .96.43.96.96ZM4.89 3.5l1.3 1.3c.38.38.37.98 0 1.36h-.01l-.01.02a.96.96 0 0 1-1.37 0l-1.3-1.3a.96.96 0 0 1 0-1.35l.04-.04a.96.96 0 0 1 1.35 0ZM.96 11.02H2.8c.53 0 .95.43.95.97v.02c0 .53-.42.97-.95.97H.96a.95.95 0 0 1-.96-.96v-.05c0-.53.43-.96.96-.96ZM3.5 19.11l1.3-1.3a.96.96 0 0 1 1.36 0v.01l.02.01c.38.38.39.99 0 1.37l-1.3 1.3a.96.96 0 0 1-1.35 0l-.04-.04a.96.96 0 0 1 0-1.35ZM11.02 23.04V21.2c0-.53.43-.95.97-.95h.02c.53 0 .97.42.97.95v1.84c0 .53-.43.96-.96.96h-.05a.95.95 0 0 1-.96-.96ZM19.11 20.5l-1.3-1.3a.96.96 0 0 1 0-1.36h.01l.01-.02a.96.96 0 0 1 1.37 0l1.3 1.3c.38.37.38.98 0 1.35l-.04.04a.96.96 0 0 1-1.35 0ZM23.04 12.98H21.2a.96.96 0 0 1-.95-.97v-.02c0-.53.42-.97.95-.97h1.84c.53 0 .96.43.96.96v.05c0 .53-.43.96-.96.96ZM20.5 4.89l-1.3 1.3a.96.96 0 0 1-1.36 0v-.01l-.02-.01a.96.96 0 0 1 0-1.37l1.3-1.3a.96.96 0 0 1 1.35 0l.04.04c.37.37.37.98 0 1.35Z"/></g><defs></defs></svg>';
69 + $dlIcons['sun_line'] = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M12 7.64a4.36 4.36 0 1 1-.01 8.73A4.36 4.36 0 0 1 12 7.64Zm0-2a6.35 6.35 0 1 0 0 12.71 6.35 6.35 0 0 0 0-12.7ZM12.98.96V2.8c0 .53-.43.96-.96.96h-.03a.96.96 0 0 1-.97-.96V.96c0-.53.43-.96.96-.96h.06c.52 0 .95.43.95.96ZM4.88 3.5l1.3 1.3c.38.38.38.98 0 1.36h-.01l-.01.02a.96.96 0 0 1-1.36.01L3.5 4.9a.96.96 0 0 1 0-1.35l.03-.04a.96.96 0 0 1 1.35 0ZM.96 11.02H2.8c.53 0 .96.43.96.96v.03c0 .53-.42.97-.96.97H.96a.96.96 0 0 1-.96-.96v-.06c0-.52.43-.95.96-.95ZM3.5 19.12l1.3-1.3a.96.96 0 0 1 1.38.02c.38.38.39.99.01 1.36l-1.3 1.3a.96.96 0 0 1-1.35 0l-.04-.03a.96.96 0 0 1 0-1.35ZM11.02 23.04V21.2c0-.53.43-.96.96-.96h.03c.53 0 .97.42.97.96v1.84c0 .53-.43.96-.96.96h-.06a.96.96 0 0 1-.95-.96ZM19.12 20.5l-1.3-1.3a.96.96 0 0 1 0-1.36h.01l.01-.02a.96.96 0 0 1 1.36-.01l1.3 1.3c.38.37.38.98 0 1.35l-.03.04a.96.96 0 0 1-1.35 0ZM23.04 12.98H21.2a.96.96 0 0 1-.96-.96v-.03c0-.53.42-.97.96-.97h1.84c.53 0 .96.43.96.96v.06c0 .52-.43.95-.96.95ZM20.5 4.88l-1.3 1.3a.96.96 0 0 1-1.36 0v-.01l-.02-.01a.96.96 0 0 1-.01-1.36l1.3-1.3a.96.96 0 0 1 1.35 0l.04.03c.38.37.38.98 0 1.35Z" /></svg>';
63 70
64 - $dlIcons = array();
65 - $dlIcons['moon'] = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M22 14.27A10.14 10.14 0 1 1 9.73 2 8.84 8.84 0 0 0 22 14.27Z"/></svg>';
66 - $dlIcons['moon_line'] = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M8.17 4.53A9.54 9.54 0 0 0 19.5 15.69a8.26 8.26 0 0 1-7.76 4.29 8.36 8.36 0 0 1-7.71-7.7 8.23 8.23 0 0 1 4.15-7.76m1-2.52c-.16 0-.32.03-.48.09a10.28 10.28 0 0 0 3.56 19.9c4.47 0 8.27-2.85 9.67-6.84a1.36 1.36 0 0 0-1.27-1.82c-.15 0-.31.03-.47.1a7.48 7.48 0 0 1-3.41.43 7.59 7.59 0 0 1-6.33-10.04A1.36 1.36 0 0 0 9.17 2Z" /></svg>';
67 - $dlIcons['sun'] = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><g><path d="M12 18.36a6.36 6.36 0 1 0 0-12.72 6.36 6.36 0 0 0 0 12.72ZM12.98.96V2.8c0 .53-.43.95-.97.95h-.02a.96.96 0 0 1-.97-.95V.96c0-.53.43-.96.96-.96h.05c.53 0 .96.43.96.96ZM4.89 3.5l1.3 1.3c.38.38.37.98 0 1.36h-.01l-.01.02a.96.96 0 0 1-1.37 0l-1.3-1.3a.96.96 0 0 1 0-1.35l.04-.04a.96.96 0 0 1 1.35 0ZM.96 11.02H2.8c.53 0 .95.43.95.97v.02c0 .53-.42.97-.95.97H.96a.95.95 0 0 1-.96-.96v-.05c0-.53.43-.96.96-.96ZM3.5 19.11l1.3-1.3a.96.96 0 0 1 1.36 0v.01l.02.01c.38.38.39.99 0 1.37l-1.3 1.3a.96.96 0 0 1-1.35 0l-.04-.04a.96.96 0 0 1 0-1.35ZM11.02 23.04V21.2c0-.53.43-.95.97-.95h.02c.53 0 .97.42.97.95v1.84c0 .53-.43.96-.96.96h-.05a.95.95 0 0 1-.96-.96ZM19.11 20.5l-1.3-1.3a.96.96 0 0 1 0-1.36h.01l.01-.02a.96.96 0 0 1 1.37 0l1.3 1.3c.38.37.38.98 0 1.35l-.04.04a.96.96 0 0 1-1.35 0ZM23.04 12.98H21.2a.96.96 0 0 1-.95-.97v-.02c0-.53.42-.97.95-.97h1.84c.53 0 .96.43.96.96v.05c0 .53-.43.96-.96.96ZM20.5 4.89l-1.3 1.3a.96.96 0 0 1-1.36 0v-.01l-.02-.01a.96.96 0 0 1 0-1.37l1.3-1.3a.96.96 0 0 1 1.35 0l.04.04c.37.37.37.98 0 1.35Z"/></g><defs></defs></svg>';
68 - $dlIcons['sun_line'] = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M12 7.64a4.36 4.36 0 1 1-.01 8.73A4.36 4.36 0 0 1 12 7.64Zm0-2a6.35 6.35 0 1 0 0 12.71 6.35 6.35 0 0 0 0-12.7ZM12.98.96V2.8c0 .53-.43.96-.96.96h-.03a.96.96 0 0 1-.97-.96V.96c0-.53.43-.96.96-.96h.06c.52 0 .95.43.95.96ZM4.88 3.5l1.3 1.3c.38.38.38.98 0 1.36h-.01l-.01.02a.96.96 0 0 1-1.36.01L3.5 4.9a.96.96 0 0 1 0-1.35l.03-.04a.96.96 0 0 1 1.35 0ZM.96 11.02H2.8c.53 0 .96.43.96.96v.03c0 .53-.42.97-.96.97H.96a.96.96 0 0 1-.96-.96v-.06c0-.52.43-.95.96-.95ZM3.5 19.12l1.3-1.3a.96.96 0 0 1 1.38.02c.38.38.39.99.01 1.36l-1.3 1.3a.96.96 0 0 1-1.35 0l-.04-.03a.96.96 0 0 1 0-1.35ZM11.02 23.04V21.2c0-.53.43-.96.96-.96h.03c.53 0 .97.42.97.96v1.84c0 .53-.43.96-.96.96h-.06a.96.96 0 0 1-.95-.96ZM19.12 20.5l-1.3-1.3a.96.96 0 0 1 0-1.36h.01l.01-.02a.96.96 0 0 1 1.36-.01l1.3 1.3c.38.37.38.98 0 1.35l-.03.04a.96.96 0 0 1-1.35 0ZM23.04 12.98H21.2a.96.96 0 0 1-.96-.96v-.03c0-.53.42-.97.96-.97h1.84c.53 0 .96.43.96.96v.06c0 .52-.43.95-.96.95ZM20.5 4.88l-1.3 1.3a.96.96 0 0 1-1.36 0v-.01l-.02-.01a.96.96 0 0 1-.01-1.36l1.3-1.3a.96.96 0 0 1 1.35 0l.04.03c.38.37.38.98 0 1.35Z" /></svg>';
71 + // The icon markup above is plugin-controlled; kses it anyway so a future edit
72 + // to $dlIcons cannot introduce raw HTML at output.
73 + $svg_allowed_tags = array(
74 + 'svg' => array(
75 + 'viewbox' => true,
76 + 'xmlns' => true,
77 + 'fill' => true,
78 + ),
79 + 'g' => array(),
80 + 'defs' => array(),
81 + 'path' => array(
82 + 'd' => true,
83 + 'fill' => true,
84 + ),
85 + );
69 86
70 - $wraper_before = '';
71 - $block_name = 'dark-light';
87 + $wraper_before = '';
88 + $block_name = 'dark-light';
72 89
73 - $wraper_before .= '<div ' . ( $attr['advanceId'] ? 'id="' . sanitize_html_class( $attr['advanceId'] ) . '" ' : '' ) . ' class="wp-block-ultimate-post-' . $block_name . ' ultp-block-' . sanitize_html_class( $attr['blockId'] ) . '' . ( $attr['align'] ? ' align' . $attr['align'] : '' ) . '' . ( $attr['className'] ? ' ' . $attr['className'] : '' ) . '">';
74 - $wraper_before .= '<div class="ultp-dark-light-block-wrapper ultp-block-wrapper ' . $layout . '">';
75 - ob_start();
76 - ?>
77 - <div class="ultp-dark-light-block-wrapper-content ultp-frontend <?php esc_attr_e( $layout ); ?>">
78 - <div class="ultp-dl-after-before-con ultp-dl-light <?php echo $dlMode == 'ultplight' ? '' : 'inactive'; ?> <?php esc_attr_e( $reverseSwitcher ); ?>" data-iconlay="<?php esc_attr_e( $layout ); ?>" data-iconsize="<?php esc_attr_e( $iconSize ); ?>" data-iconrev="<?php esc_attr_e( $reverseSwitcher ); ?>">
79 - <?php if ( $enableText && $layout != 'layout7' && in_array( $textAppears, array( 'left', 'both' ) ) ) : ?>
80 - <div class="ultp-dl-before-after-text lightText"><?php echo $lightText; ?></div>
81 - <?php endif; ?>
82 - <div class="ultp-dl-con ultp-light-con <?php esc_attr_e( $reverseSwitcher ); ?>">
83 - <div class="ultp-dl-svg-con">
84 - <div class="ultp-dl-svg"><?php echo $dlIcons[ $iconType == 'line' ? 'sun_line' : 'sun' ]; ?></div>
85 - </div>
86 - <?php if ( in_array( $layout, array( 'layout5', 'layout6', 'layout7' ) ) ) : ?>
87 - <div class="ultp-dl-text lightText">
88 - <?php if ( in_array( $layout, array( 'layout5', 'layout6' ) ) ) : ?>
89 - <div class="ultp-dl-democircle <?php esc_attr_e( $layout == 'layout5' ? 'ultphidden' : '' ); ?>"></div>
90 - <?php endif; ?>
91 - <?php if ( $layout == 'layout7' ) : ?>
92 - <?php echo $lightText; ?>
93 - <?php endif; ?>
94 - </div>
95 - <?php endif; ?>
90 + $wraper_before .= '<div ' . ( $attr['advanceId'] ? 'id="' . sanitize_html_class( $attr['advanceId'] ) . '" ' : '' ) . ' class="wp-block-ultimate-post-' . $block_name . ' ultp-block-' . sanitize_html_class( $attr['blockId'] ) . '' . ( $attr['align'] ? ' align' . $attr['align'] : '' ) . '' . ( $attr['className'] ? ' ' . $attr['className'] : '' ) . '">';
91 + $wraper_before .= '<div class="ultp-dark-light-block-wrapper ultp-block-wrapper ' . $layout . '">';
92 + ob_start();
93 + ?>
94 + <div class="ultp-dark-light-block-wrapper-content ultp-frontend <?php echo esc_attr( $layout ); ?>">
95 + <div class="ultp-dl-after-before-con ultp-dl-light <?php echo esc_attr( 'ultplight' == $dlMode ? '' : 'inactive' ); ?> <?php echo esc_attr( $reverseSwitcher ); ?>" data-iconlay="<?php echo esc_attr( $layout ); ?>" data-iconsize="<?php echo esc_attr( $iconSize ); ?>" data-iconrev="<?php echo esc_attr( $reverseSwitcher ); ?>">
96 + <?php if ( $sideText && in_array( $textAppears, array( 'left', 'both' ) ) ) : ?>
97 + <div class="ultp-dl-before-after-text lightText"><?php echo wp_kses( $lightText, $allowed_html_tags ); ?></div>
98 + <?php endif; ?>
99 + <div class="ultp-dl-con ultp-light-con <?php echo esc_attr( $reverseSwitcher ); ?>">
100 + <div class="ultp-dl-svg-con">
101 + <div class="ultp-dl-svg"><?php echo wp_kses( $dlIcons[ $iconType == 'line' ? 'sun_line' : 'sun' ], $svg_allowed_tags ); ?></div>
96 102 </div>
97 - <?php if ( $enableText && $layout != 'layout7' && in_array( $textAppears, array( 'right', 'both' ) ) ) : ?>
98 - <div class="ultp-dl-before-after-text <?php esc_attr_e( $textAppears != 'both' ? 'lightText' : 'darkText' ); ?>"><?php echo $textAppears != 'both' ? $lightText : $darkText; ?></div>
99 - <?php endif; ?>
103 + <?php echo wp_kses( $lightInner, $inner_allowed ); ?>
100 104 </div>
101 - <div class="ultp-dl-after-before-con ultp-dl-dark <?php echo $dlMode == 'ultplight' ? 'inactive' : ''; ?> <?php esc_attr_e( $reverseSwitcher ); ?>" data-iconlay="<?php esc_attr_e( $layout ); ?>" data-iconsize="<?php esc_attr_e( $iconSize ); ?>" data-iconrev="<?php esc_attr_e( $reverseSwitcher ); ?>">
102 - <?php if ( $enableText && $layout != 'layout7' && in_array( $textAppears, array( 'left', 'both' ) ) ) : ?>
103 - <div class="ultp-dl-before-after-text <?php esc_attr_e( $textAppears != 'both' ? 'darkText' : 'lightText' ); ?>"><?php echo $textAppears != 'both' ? $darkText : $lightText; ?></div>
104 - <?php endif; ?>
105 - <div class="ultp-dl-con ultp-dark-con <?php esc_attr_e( $reverseSwitcher ); ?>">
106 - <?php if ( in_array( $layout, array( 'layout5', 'layout6', 'layout7' ) ) ) : ?>
107 - <div class="ultp-dl-text darkText">
108 - <?php if ( in_array( $layout, array( 'layout5', 'layout6' ) ) ) : ?>
109 - <div class="ultp-dl-democircle <?php esc_attr_e( $layout == 'layout5' ? 'ultphidden' : '' ); ?>"></div>
110 - <?php endif; ?>
111 - <?php if ( $layout == 'layout7' ) : ?>
112 - <?php echo $darkText; ?>
113 - <?php endif; ?>
114 - </div>
115 - <?php endif; ?>
116 - <div class="ultp-dl-svg-con">
117 - <div class="ultp-dl-svg"><?php echo $dlIcons[ $iconType == 'line' ? 'moon_line' : 'moon' ]; ?></div>
118 - </div>
105 + <?php if ( $sideText && in_array( $textAppears, array( 'right', 'both' ) ) ) : ?>
106 + <div class="ultp-dl-before-after-text <?php echo esc_attr( $textAppears != 'both' ? 'lightText' : 'darkText' ); ?>"><?php echo wp_kses( $textAppears != 'both' ? $lightText : $darkText, $allowed_html_tags ); ?></div>
107 + <?php endif; ?>
108 + </div>
109 + <div class="ultp-dl-after-before-con ultp-dl-dark <?php echo esc_attr( 'ultplight' == $dlMode ? 'inactive' : '' ); ?> <?php echo esc_attr( $reverseSwitcher ); ?>" data-iconlay="<?php echo esc_attr( $layout ); ?>" data-iconsize="<?php echo esc_attr( $iconSize ); ?>" data-iconrev="<?php echo esc_attr( $reverseSwitcher ); ?>">
110 + <?php if ( $sideText && in_array( $textAppears, array( 'left', 'both' ) ) ) : ?>
111 + <div class="ultp-dl-before-after-text <?php echo esc_attr( $textAppears != 'both' ? 'darkText' : 'lightText' ); ?>"><?php echo wp_kses( $textAppears != 'both' ? $darkText : $lightText, $allowed_html_tags ); ?></div>
112 + <?php endif; ?>
113 + <div class="ultp-dl-con ultp-dark-con <?php echo esc_attr( $reverseSwitcher ); ?>">
114 + <?php echo wp_kses( $darkInner, $inner_allowed ); ?>
115 + <div class="ultp-dl-svg-con">
116 + <div class="ultp-dl-svg"><?php echo wp_kses( $dlIcons[ $iconType == 'line' ? 'moon_line' : 'moon' ], $svg_allowed_tags ); ?></div>
119 117 </div>
120 - <?php if ( $enableText && $layout != 'layout7' && in_array( $textAppears, array( 'right', 'both' ) ) ) : ?>
121 - <div class="ultp-dl-before-after-text darkText"><?php echo $darkText; ?></div>
122 - <?php endif; ?>
123 118 </div>
119 + <?php if ( $sideText && in_array( $textAppears, array( 'right', 'both' ) ) ) : ?>
120 + <div class="ultp-dl-before-after-text darkText"><?php echo wp_kses( $darkText, $allowed_html_tags ); ?></div>
121 + <?php endif; ?>
124 122 </div>
125 - <?php
126 - $wraper_before .= ob_get_clean();
127 - $wraper_before .= '</div>';
128 - $wraper_before .= '</div>';
123 + </div>
124 + <?php
125 + $wraper_before .= ob_get_clean();
126 + $wraper_before .= '</div>';
127 + $wraper_before .= '</div>';
129 128
130 - return $wraper_before;
131 - }
129 + return $wraper_before;
132 130 }
133 131 }