| @@ -942,9 +942,13 @@ | ||
| 942 | 942 | * @param int $post_id The post ID. |
| 943 | 943 | */ |
| 944 | 944 | $data = apply_filters( 'elementor/frontend/builder_content_data', $data, $post_id ); |
| 945 | 945 | |
| 946 | + do_action( 'elementor/frontend/before_get_builder_content', $document, $this->_is_excerpt ); | |
| 947 | + | |
| 946 | 948 | if ( empty( $data ) ) { |
| 949 | + Plugin::$instance->documents->restore_document(); | |
| 950 | + | |
| 947 | 951 | return ''; |
| 948 | 952 | } |
| 949 | 953 | |
| 950 | 954 | if ( ! $this->_is_excerpt ) { |
| @@ -990,8 +994,10 @@ | ||
| 990 | 994 | } |
| 991 | 995 | |
| 992 | 996 | Plugin::$instance->documents->restore_document(); |
| 993 | 997 | |
| 998 | + // BC | |
| 999 | + // TODO: use Deprecation::do_deprecated_action() in 3.1.0 | |
| 994 | 1000 | do_action( 'elementor/frontend/get_builder_content', $document, $this->_is_excerpt, $with_css ); |
| 995 | 1001 | |
| 996 | 1002 | return $content; |
| 997 | 1003 | } |