PluginProbe
WP Ultimate Post Grid / 3.0.0
WP Ultimate Post Grid v3.0.0
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
← All changes | includes/public/class-wpupg-template-helper.php +3 -15 4.1.1 → 3.0.0 View file →
@@ -89,9 +89,9 @@
89 89 if ( $atts['icon'] ) {
90 90 $icon = WPUPG_Icon::get( $atts['icon'], $atts['icon_color'] );
91 91
92 92 if ( $icon ) {
93 - $icon = '<span class="wpupg-icon wpupg-item-' . esc_attr( $field ) . '-icon">' . $icon . '</span> ';
93 + $icon = '<span class="wpupg-item-icon wpupg-item-' . $field . '-icon">' . $icon . '</span> ';
94 94 }
95 95 }
96 96
97 97 // Get optional label.
@@ -96,9 +96,9 @@
96 96
97 97 // Get optional label.
98 98 $label = '';
99 99 if ( $atts['label'] ) {
100 - $label = '<span class="wpupg-item-label wpupg-block-text-' . esc_attr( $atts['label_style'] ) . ' wpupg-item-' . esc_attr( $field ) . '-label">' . WPUPG_Shortcode::sanitize_html( __( $atts['label'], 'wp-ultimate-post-grid' ) . $atts['label_separator'] ) . '</span>';
100 + $label = '<span class="wpupg-item-label wpupg-block-text-' . $atts['label_style'] . ' wpupg-item-' . $field . '-label">' . __( $atts['label'], 'wp-ultimate-post-grid' ) . $atts['label_separator'] . '</span>';
101 101 }
102 102
103 103 $label_container = '';
104 104 if ( $icon || $label ) {
@@ -147,16 +147,8 @@
147 147 'id' => 'limit_text',
148 148 'value' => '1',
149 149 ),
150 150 ),
151 - 'limit_ignore_html' => array(
152 - 'default' => '0',
153 - 'type' => 'toggle',
154 - 'dependency' => array(
155 - 'id' => 'limit_text',
156 - 'value' => '1',
157 - ),
158 - ),
159 151 );
160 152 }
161 153
162 154 /**
@@ -171,12 +163,8 @@
171 163 $limited = false;
172 164 $limit = intval( $atts['limit_number'] );
173 165
174 166 if ( 0 < $limit ) {
175 - if ( (bool) $atts['limit_ignore_html'] ) {
176 - $text = wp_strip_all_tags( $text );
177 - }
178 -
179 167 if ( 'words' === $atts['limit_type'] && $limit < str_word_count( $text, 0 ) ) {
180 168 // Limit to X words.
181 169 $words = str_word_count( $text, 2 );
182 170 $pos = array_keys( $words );
@@ -182,9 +170,9 @@
182 170 $pos = array_keys( $words );
183 171 $text = substr( $text, 0, $pos[ $limit ] );
184 172
185 173 $limited = true;
186 - } elseif ( 'characters' === $atts['limit_type'] && $limit < strlen( $text ) ) {
174 + } elseif ( $limit < strlen( $text ) ) {
187 175 // Limit to X characters.
188 176 $text = substr( $text, 0, $limit );
189 177
190 178 $limited = true;