| @@ -19,8 +19,9 @@ | ||
| 19 | 19 | use Elementor\Widget_Base; |
| 20 | 20 | use Elementor\Core\Settings\Page\Manager as PageManager; |
| 21 | 21 | use ElementorPro\Modules\Library\Widgets\Template; |
| 22 | 22 | use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager; |
| 23 | +use Elementor\Modules\AtomicWidgets\Module as Atomic_Widgets_Module; | |
| 23 | 24 | |
| 24 | 25 | if ( ! defined( 'ABSPATH' ) ) { |
| 25 | 26 | exit; // Exit if accessed directly. |
| 26 | 27 | } |
| @@ -608,12 +609,8 @@ | ||
| 608 | 609 | |
| 609 | 610 | if ( $autosave_id ) { |
| 610 | 611 | $document = Plugin::$instance->documents->get( $autosave_id ); |
| 611 | 612 | } elseif ( $create ) { |
| 612 | - if ( ! function_exists( 'wp_create_post_autosave' ) ) { | |
| 613 | - require_once ABSPATH . 'wp-admin/includes/post.php'; | |
| 614 | - } | |
| 615 | - | |
| 616 | 613 | $autosave_id = wp_create_post_autosave( [ |
| 617 | 614 | 'post_ID' => $this->post->ID, |
| 618 | 615 | 'post_type' => $this->post->post_type, |
| 619 | 616 | 'post_title' => $this->post->post_title, |
| @@ -642,9 +639,9 @@ | ||
| 642 | 639 | * Fired by `post_row_actions` and `page_row_actions` filters. |
| 643 | 640 | * |
| 644 | 641 | * @access public |
| 645 | 642 | * |
| 646 | - * @param array $actions An array of row action links. | |
| 643 | + * @param array $actions An array of row action links. | |
| 647 | 644 | * |
| 648 | 645 | * @return array An updated array of row action links. |
| 649 | 646 | */ |
| 650 | 647 | public function filter_admin_row_actions( $actions ) { |
| @@ -1052,10 +1049,8 @@ | ||
| 1052 | 1049 | * @param null $data |
| 1053 | 1050 | * @param bool $with_html_content |
| 1054 | 1051 | * |
| 1055 | 1052 | * @return array |
| 1056 | - * | |
| 1057 | - * @throws \Exception If elements retrieval fails or data processing errors occur. | |
| 1058 | 1053 | */ |
| 1059 | 1054 | public function get_elements_raw_data( $data = null, $with_html_content = false ) { |
| 1060 | 1055 | if ( ! static::get_property( 'has_elements' ) ) { |
| 1061 | 1056 | return []; |
| @@ -1064,23 +1059,8 @@ | ||
| 1064 | 1059 | if ( is_null( $data ) ) { |
| 1065 | 1060 | $data = $this->get_elements_data(); |
| 1066 | 1061 | } |
| 1067 | 1062 | |
| 1068 | - /** | |
| 1069 | - * Filters document elements data after loading. | |
| 1070 | - * | |
| 1071 | - * Allows modification of elements data when loading (not saving). | |
| 1072 | - * Useful for migrations, transformations, or data enrichment. | |
| 1073 | - * | |
| 1074 | - * @since 3.35.0 | |
| 1075 | - * | |
| 1076 | - * @param array $data The elements data array. | |
| 1077 | - * @param \Elementor\Core\Base\Document $document The document instance. | |
| 1078 | - */ | |
| 1079 | - if ( ! $this->is_saving ) { | |
| 1080 | - $data = apply_filters( 'elementor/document/load/data', $data, $this ); | |
| 1081 | - } | |
| 1082 | - | |
| 1083 | 1063 | // Change the current documents, so widgets can use `documents->get_current` and other post data |
| 1084 | 1064 | Plugin::$instance->documents->switch_to_document( $this ); |
| 1085 | 1065 | |
| 1086 | 1066 | $editor_data = []; |
| @@ -1476,9 +1456,9 @@ | ||
| 1476 | 1456 | * @since 2.0.4 |
| 1477 | 1457 | * @access public |
| 1478 | 1458 | * |
| 1479 | 1459 | * @param string $key Meta data key. |
| 1480 | - * @param mixed $value Meta data value. | |
| 1460 | + * @param mixed $value Meta data value. | |
| 1481 | 1461 | * |
| 1482 | 1462 | * @return bool|int |
| 1483 | 1463 | */ |
| 1484 | 1464 | public function update_main_meta( $key, $value ) { |
| @@ -1813,11 +1793,11 @@ | ||
| 1813 | 1793 | } |
| 1814 | 1794 | |
| 1815 | 1795 | /** |
| 1816 | 1796 | * @since 2.1.3 |
| 1817 | - * @access public | |
| 1797 | + * @access protected | |
| 1818 | 1798 | */ |
| 1819 | - public function print_elements( $elements_data ) { | |
| 1799 | + protected function print_elements( $elements_data ) { | |
| 1820 | 1800 | $is_element_cache_active = 'disable' !== get_option( 'elementor_element_cache_ttl', '' ); |
| 1821 | 1801 | if ( ! $is_element_cache_active ) { |
| 1822 | 1802 | ob_start(); |
| 1823 | 1803 | |
| @@ -2107,10 +2087,6 @@ | ||
| 2107 | 2087 | $this->elements_iteration_actions[] = new Assets_Iteration_Action( $this ); |
| 2108 | 2088 | } |
| 2109 | 2089 | |
| 2110 | 2090 | return $this->elements_iteration_actions; |
| 2111 | - } | |
| 2112 | - | |
| 2113 | - public function get_elementor_version() { | |
| 2114 | - return $this->get_main_meta( '_elementor_version' ); | |
| 2115 | 2091 | } |
| 2116 | 2092 | } |