PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.3
Elementor Website Builder – more than just a page builder v4.2.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 | core/base/document.php +20 -5 4.0.94.2.3 View file →
@@ -46,8 +46,10 @@
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 +
50 52 /**
51 53 * Document publish status.
52 54 */
53 55 const STATUS_PUBLISH = 'publish';
@@ -230,9 +232,16 @@
230 232 *
231 233 * @return array
232 234 */
233 235 private static function get_panel_category_item( $promotion, $index, array $categories, bool $has_pro ): array {
234 - if ( ! $has_pro ) {
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 ) {
235 244 $categories[ $index ]['promotion'] = Filtered_Promotions_Manager::get_filtered_promotion_data(
236 245 $promotion,
237 246 'elementor/panel/' . $index . '/custom_promotion',
238 247 'url'
@@ -647,9 +656,9 @@
647 656 *
648 657 * @return array An updated array of row action links.
649 658 */
650 659 public function filter_admin_row_actions( $actions ) {
651 - if ( $this->is_built_with_elementor() && $this->is_editable_by_current_user() ) {
660 + if ( $this->is_editable_with_elementor() ) {
652 661 $actions['edit_with_elementor'] = sprintf(
653 662 '<a href="%1$s">%2$s</a>',
654 663 $this->get_edit_url(),
655 664 __( 'Edit with Elementor', 'elementor' )
@@ -658,8 +667,16 @@
658 667
659 668 return $actions;
660 669 }
661 670
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 +
662 679 /**
663 680 * @since 2.0.0
664 681 * @access public
665 682 */
@@ -836,11 +853,9 @@
836 853 */
837 854 do_action( 'elementor/document/before_save', $this, $data );
838 855
839 856 if ( ! current_user_can( 'unfiltered_html' ) ) {
840 - $data = map_deep( $data, function ( $value ) {
841 - return is_bool( $value ) || is_null( $value ) ? $value : wp_kses_post( $value );
842 - } );
857 + $data = Utils::kses_post_deep( $data );
843 858 }
844 859
845 860 if ( ! empty( $data['settings'] ) ) {
846 861 if ( isset( $data['settings']['post_status'] ) && self::STATUS_AUTOSAVE === $data['settings']['post_status'] ) {