PluginProbe
Elementor Website Builder – more than just a page builder / 4.0.9
Elementor Website Builder – more than just a page builder v4.0.9
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 | core/base/document.php +5 -36 4.3.0-beta24.0.9 View file →
@@ -46,10 +46,8 @@
46 46 const BUILT_WITH_ELEMENTOR_META_KEY = '_elementor_edit_mode';
47 47
48 48 const CACHE_META_KEY = '_elementor_element_cache';
49 49
50 - const UNEDITABLE_WITH_ELEMENTOR_TYPES = [ 'kit' ];
51 -
52 50 /**
53 51 * Document publish status.
54 52 */
55 53 const STATUS_PUBLISH = 'publish';
@@ -232,16 +230,9 @@
232 230 *
233 231 * @return array
234 232 */
235 233 private static function get_panel_category_item( $promotion, $index, array $categories, bool $has_pro ): array {
236 - $keep_promotion = $has_pro && apply_filters(
237 - 'elementor/document/panel_category_keep_promotion',
238 - false,
239 - $index,
240 - $promotion
241 - );
242 -
243 - if ( ! $has_pro || $keep_promotion ) {
234 + if ( ! $has_pro ) {
244 235 $categories[ $index ]['promotion'] = Filtered_Promotions_Manager::get_filtered_promotion_data(
245 236 $promotion,
246 237 'elementor/panel/' . $index . '/custom_promotion',
247 238 'url'
@@ -656,9 +647,9 @@
656 647 *
657 648 * @return array An updated array of row action links.
658 649 */
659 650 public function filter_admin_row_actions( $actions ) {
660 - if ( $this->is_editable_with_elementor() ) {
651 + if ( $this->is_built_with_elementor() && $this->is_editable_by_current_user() ) {
661 652 $actions['edit_with_elementor'] = sprintf(
662 653 '<a href="%1$s">%2$s</a>',
663 654 $this->get_edit_url(),
664 655 __( 'Edit with Elementor', 'elementor' )
@@ -667,16 +658,8 @@
667 658
668 659 return $actions;
669 660 }
670 661
671 - public function is_editable_with_elementor() {
672 - if ( in_array( $this->get_type(), self::UNEDITABLE_WITH_ELEMENTOR_TYPES ) ) {
673 - return false;
674 - }
675 -
676 - return $this->is_editable_by_current_user() && $this->is_built_with_elementor();
677 - }
678 -
679 662 /**
680 663 * @since 2.0.0
681 664 * @access public
682 665 */
@@ -853,9 +836,11 @@
853 836 */
854 837 do_action( 'elementor/document/before_save', $this, $data );
855 838
856 839 if ( ! current_user_can( 'unfiltered_html' ) ) {
857 - $data = Utils::kses_post_deep( $data );
840 + $data = map_deep( $data, function ( $value ) {
841 + return is_bool( $value ) || is_null( $value ) ? $value : wp_kses_post( $value );
842 + } );
858 843 }
859 844
860 845 if ( ! empty( $data['settings'] ) ) {
861 846 if ( isset( $data['settings']['post_status'] ) && self::STATUS_AUTOSAVE === $data['settings']['post_status'] ) {
@@ -1871,12 +1856,8 @@
1871 1856
1872 1857 if ( $should_store_scripts ) {
1873 1858 $scripts_to_queue = array_values( array_diff( $wp_scripts->queue, $scripts_ignored ) );
1874 1859 $styles_to_queue = array_values( array_diff( $wp_styles->queue, $styles_ignored ) );
1875 - $styles_to_queue = array_values( array_filter(
1876 - $styles_to_queue,
1877 - [ $this, 'should_enqueue_cached_style' ]
1878 - ) );
1879 1860 }
1880 1861
1881 1862 $cached_data = [
1882 1863 'content' => ob_get_clean(),
@@ -1897,12 +1878,8 @@
1897 1878 }
1898 1879
1899 1880 if ( ! empty( $cached_data['styles'] ) ) {
1900 1881 foreach ( $cached_data['styles'] as $style_handle ) {
1901 - if ( ! $this->should_enqueue_cached_style( $style_handle ) ) {
1902 - continue;
1903 - }
1904 -
1905 1882 wp_enqueue_style( $style_handle );
1906 1883 }
1907 1884 }
1908 1885 }
@@ -1915,16 +1892,8 @@
1915 1892 }
1916 1893
1917 1894 echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1918 1895 }
1919 - }
1920 -
1921 - private function should_enqueue_cached_style( $style_handle ): bool {
1922 - if ( 0 !== strpos( $style_handle, 'elementor-post' ) ) {
1923 - return true;
1924 - }
1925 -
1926 - return (bool) wp_styles()->query( 'elementor-frontend', 'registered' );
1927 1896 }
1928 1897
1929 1898 protected function do_print_elements( $elements_data ) {
1930 1899 $this->update_runtime_elements( $elements_data );