| @@ -6,13 +6,13 @@ | ||
| 6 | 6 | use Elementor\Core\Base\Module as BaseModule; |
| 7 | 7 | use Elementor\Core\Kits\Documents\Kit; |
| 8 | 8 | use Elementor\Plugin; |
| 9 | 9 | use Elementor\Utils; |
| 10 | -use Elementor\Core\DocumentTypes\PageBase; | |
| 10 | +use Elementor\Core\DocumentTypes\PageBase as PageBase; | |
| 11 | 11 | use Elementor\Modules\Library\Documents\Page as LibraryPageDocument; |
| 12 | 12 | |
| 13 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | - exit; // Exit if accessed directly. | |
| 14 | + exit; // Exit if accessed directly | |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * Elementor page templates module. |
| @@ -133,11 +133,13 @@ | ||
| 133 | 133 | * @since 2.0.0 |
| 134 | 134 | * @access public |
| 135 | 135 | * @static |
| 136 | 136 | * |
| 137 | - * @param array $page_templates Array of page templates. Keys are filenames, checks are translated names. | |
| 137 | + * @param array $page_templates Array of page templates. Keys are filenames, | |
| 138 | + * checks are translated names. | |
| 139 | + * | |
| 138 | 140 | * @param \WP_Theme $wp_theme |
| 139 | - * @param \WP_Post $post | |
| 141 | + * @param \WP_Post $post | |
| 140 | 142 | * |
| 141 | 143 | * @return array Page templates. |
| 142 | 144 | */ |
| 143 | 145 | public function add_page_templates( $page_templates, $wp_theme, $post ) { |
| @@ -285,11 +287,9 @@ | ||
| 285 | 287 | |
| 286 | 288 | $document->end_injection(); |
| 287 | 289 | } |
| 288 | 290 | |
| 289 | - /** | |
| 290 | - * The $options variable is an array of $control_options to overwrite the default. | |
| 291 | - */ | |
| 291 | + // The $options variable is an array of $control_options to overwrite the default | |
| 292 | 292 | public function add_template_controls( Document $document, $control_id, $control_options ) { |
| 293 | 293 | // Default Control Options |
| 294 | 294 | $default_control_options = [ |
| 295 | 295 | 'label' => esc_html__( 'Page Layout', 'elementor' ), |
| @@ -402,8 +402,18 @@ | ||
| 402 | 402 | } |
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | return $check; |
| 406 | + } | |
| 407 | + | |
| 408 | + /** | |
| 409 | + * Support `wp_body_open` action, available since WordPress 5.2. | |
| 410 | + * | |
| 411 | + * @since 2.7.0 | |
| 412 | + * @access public | |
| 413 | + */ | |
| 414 | + public static function body_open() { | |
| 415 | + wp_body_open(); | |
| 406 | 416 | } |
| 407 | 417 | |
| 408 | 418 | /** |
| 409 | 419 | * Page templates module constructor. |