PluginProbe
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder / 51.1.87
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder v51.1.87
51.1.87 51.1.86 51.1.84 51.1.85 51.1.83 51.1.82 51.1.81 51.1.79 51.1.78 51.1.77 51.1.76 51.1.74 51.1.75 51.1.65 51.1.64 51.1.63 trunk 51.1.14 51.1.2 51.1.35 51.1.36 51.1.37 51.1.38 51.1.39 51.1.44 All 41 releases
← All changes | includes/widgets/Media_Grid/Media_Grid.php +20 -18 51.1.83 → 51.1.87 View file →
@@ -7250,33 +7250,35 @@
7250 7250 }
7251 7251
7252 7252 public function get_animation_class($data, $object)
7253 7253 {
7254 - $class = '';
7255 - if ('none' !== $data[$object . '_animation']) {
7256 - $class .= ' king-addons-' . $object . '-' . $data[$object . '_animation'];
7257 - $class .= ' king-addons-anim-size-' . $data[$object . '_animation_size'];
7258 - $class .= ' king-addons-animation-timing-' . $data[$object . '_animation_timing'];
7259 - if ('yes' === $data[$object . '_animation_tr']) $class .= ' king-addons-anim-transparency';
7254 + $animation = Grid_Ajax_Security::sanitize_animation($data[$object . '_animation'] ?? 'none');
7255 + if ('none' === $animation) {
7256 + return '';
7260 7257 }
7258 +
7259 + $class = ' king-addons-' . sanitize_html_class((string) $object) . '-' . $animation;
7260 + $class .= ' king-addons-anim-size-' . Grid_Ajax_Security::sanitize_animation_size($data[$object . '_animation_size'] ?? 'large');
7261 + $class .= ' king-addons-animation-timing-' . Grid_Ajax_Security::sanitize_animation_timing($data[$object . '_animation_timing'] ?? 'ease-default');
7262 +
7263 + if ('yes' === Grid_Ajax_Security::sanitize_yes_no_switcher($data[$object . '_animation_tr'] ?? '')) {
7264 + $class .= ' king-addons-anim-transparency';
7265 + }
7266 +
7261 7267 return $class;
7262 7268 }
7263 7269
7264 7270 public function get_image_effect_class($s)
7265 7271 {
7272 + $effect = Grid_Ajax_Security::sanitize_image_effect($s['image_effects'] ?? 'none');
7266 7273 $class = '';
7267 - if (!king_addons_freemius()->can_use_premium_code__premium_only()) {
7268 - if (in_array($s['image_effects'], ['pro-zi', 'pro-zo', 'pro-go', 'pro-bo'])) {
7269 - $s['image_effects'] = 'none';
7270 - }
7274 + if ('none' !== $effect) {
7275 + $class .= ' king-addons-' . $effect;
7271 7276 }
7272 - if ('none' !== $s['image_effects']) {
7273 - $class .= ' king-addons-' . $s['image_effects'];
7274 - }
7275 - if ('slide' !== $s['image_effects']) {
7276 - $class .= ' king-addons-effect-size-' . $s['image_effects_size'];
7277 + if ('slide' !== $effect) {
7278 + $class .= ' king-addons-effect-size-' . Grid_Ajax_Security::sanitize_image_effect_size($s['image_effects_size'] ?? 'medium');
7277 7279 } else {
7278 - $class .= ' king-addons-effect-dir-' . $s['image_effects_direction'];
7280 + $class .= ' king-addons-effect-dir-' . Grid_Ajax_Security::sanitize_image_effect_direction($s['image_effects_direction'] ?? 'bottom');
7279 7281 }
7280 7282 return $class;
7281 7283 }
7282 7284
@@ -7301,9 +7303,9 @@
7301 7303 $post_id = get_the_ID();
7302 7304 }
7303 7305
7304 7306 $overlay_url = $post_id ? get_the_permalink($post_id) : '#';
7305 - echo '<div class="king-addons-grid-media-hover-bg ' . $this->get_animation_class($s, 'overlay') . '" data-url="' . esc_url($overlay_url) . '">';
7307 + echo '<div class="king-addons-grid-media-hover-bg ' . esc_attr($this->get_animation_class($s, 'overlay')) . '" data-url="' . esc_url($overlay_url) . '">';
7306 7308 if (king_addons_freemius()->can_use_premium_code__premium_only()) {
7307 7309 if ('' !== $s['overlay_image']['url']) {
7308 7310 echo '<img src="' . esc_url($s['overlay_image']['url']) . '">';
7309 7311 }
@@ -8023,9 +8025,9 @@
8023 8025
8024 8026 echo '<article class="' . esc_attr($post_class) . '">';
8025 8027 echo '<div class="king-addons-grid-item-inner">';
8026 8028 $this->get_elements_by_location('above', $s, get_the_ID());
8027 - echo '<div class="king-addons-grid-media-wrap' . $this->get_image_effect_class($s) . ' ">';
8029 + echo '<div class="king-addons-grid-media-wrap' . esc_attr($this->get_image_effect_class($s)) . ' ">';
8028 8030 $this->render_post_thumbnail($s);
8029 8031 echo '<div class="king-addons-grid-media-hover king-addons-animation-wrap">';
8030 8032 $this->render_media_overlay($s);
8031 8033 $this->get_elements_by_location('over', $s, get_the_ID());