PluginProbe
Elementor Website Builder – more than just a page builder / 3.4.3
Elementor Website Builder – more than just a page builder v3.4.3
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | includes/utils.php +17 -4 3.4.23.4.3 View file →
@@ -78,8 +78,14 @@
78 78 'd' => true,
79 79 'fill' => true,
80 80 ],
81 81 ],
82 + 'image' => [
83 + 'img' => [
84 + 'srcset' => true,
85 + 'sizes' => true,
86 + ],
87 + ],
82 88 ];
83 89
84 90 /**
85 91 * Is ajax.
@@ -508,18 +514,25 @@
508 514 }
509 515
510 516 public static function get_meta_viewport( $context = '' ) {
511 517 $meta_tag = '<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />';
518 +
512 519 /**
513 520 * Viewport meta tag.
514 521 *
515 - * Filters the Elementor preview URL.
522 + * Filters the meta tag containing the viewport information.
516 523 *
524 + * This hook can be used to change the intial viewport meta tag set by Elementor
525 + * and replace it with a different viewport tag.
526 + *
517 527 * @since 2.5.0
518 528 *
519 529 * @param string $meta_tag Viewport meta tag.
530 + * @param string $context Page context.
520 531 */
521 - return apply_filters( 'elementor/template/viewport_tag', $meta_tag, $context );
532 + $meta_tag = apply_filters( 'elementor/template/viewport_tag', $meta_tag, $context );
533 +
534 + return $meta_tag;
522 535 }
523 536
524 537 /**
525 538 * Add Elementor Config js vars to the relevant script handle,
@@ -742,9 +755,9 @@
742 755
743 756 return new \WP_Query( $args );
744 757 }
745 758
746 - public static function print_wp_kses_extended( string $string, array $tags ) {
759 + public static function print_wp_kses_extended( $string, array $tags ) {
747 760 $allowed_html = wp_kses_allowed_html( 'post' );
748 761 // Since PHP 5.6 cannot use isset() on the result of an expression.
749 762 $extended_allowed_html_tags = self::EXTENDED_ALLOWED_HTML_TAGS;
750 763
@@ -750,9 +763,9 @@
750 763
751 764 foreach ( $tags as $tag ) {
752 765 if ( isset( $extended_allowed_html_tags[ $tag ] ) ) {
753 766 $extended_tags = apply_filters( "elementor/extended_allowed_html_tags/{$tag}", self::EXTENDED_ALLOWED_HTML_TAGS[ $tag ] );
754 - $allowed_html = array_merge( $allowed_html, $extended_tags );
767 + $allowed_html = array_replace_recursive( $allowed_html, $extended_tags );
755 768 }
756 769 }
757 770
758 771 echo wp_kses( $string, $allowed_html );