PluginProbe
Elementor Website Builder – more than just a page builder / 3.1.0-dev2
Elementor Website Builder – more than just a page builder v3.1.0-dev2
4.3.0 4.3.0-beta3 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 All 453 releases
← All changes | core/editor/editor.php +8 -215 3.1.0-dev13.1.0-dev2 View file →
@@ -110,9 +110,9 @@
110 110
111 111 Plugin::$instance->documents->switch_to_document( $document );
112 112
113 113 // Change mode to Builder
114 - Plugin::$instance->db->set_is_elementor_page( $this->post_id );
114 + $document->set_is_built_with_elementor( true );
115 115
116 116 // End BC.
117 117
118 118 Loading_Inspection_Manager::instance()->register_inspections();
@@ -119,11 +119,8 @@
119 119
120 120 // Send MIME Type header like WP admin-header.
121 121 @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
122 122
123 - // Temp: Allow plugins to know that the editor route is ready. TODO: Remove on 2.7.3.
124 - define( 'ELEMENTOR_EDITOR_USE_ROUTER', true );
125 -
126 123 add_filter( 'show_admin_bar', '__return_false' );
127 124
128 125 // Remove all WordPress actions
129 126 remove_all_actions( 'wp_head' );
@@ -525,8 +522,12 @@
525 522 $page_title_selector = $kits_manager->get_current_settings( 'page_title_selector' );
526 523
527 524 $page_title_selector .= ', .elementor-page-title';
528 525
526 + $active_experimental_features = Plugin::$instance->experiments->get_active_features();
527 +
528 + $active_experimental_features = array_fill_keys( array_keys( $active_experimental_features ), true );
529 +
529 530 $config = [
530 531 'initial_document' => $document->get_config(),
531 532 'version' => ELEMENTOR_VERSION,
532 533 'home_url' => home_url(),
@@ -587,219 +588,9 @@
587 588 'ui' => [
588 589 'darkModeStylesheetURL' => ELEMENTOR_ASSETS_URL . 'css/editor-dark-mode' . $suffix . '.css',
589 590 'defaultGenericFonts' => $kits_manager->get_current_settings( 'default_generic_fonts' ),
590 591 ],
591 - // Legacy Mode - for backwards compatibility of older HTML markup.
592 - 'legacyMode' => [
593 - 'elementWrappers' => Plugin::instance()->get_legacy_mode( 'elementWrappers' ),
594 - ],
595 - 'i18n' => [
596 - 'elementor' => __( 'Elementor', 'elementor' ),
597 - 'edit' => __( 'Edit', 'elementor' ),
598 - 'delete' => __( 'Delete', 'elementor' ),
599 - 'cancel' => __( 'Cancel', 'elementor' ),
600 - 'clear' => __( 'Clear', 'elementor' ),
601 - 'done' => __( 'Done', 'elementor' ),
602 - 'got_it' => __( 'Got It', 'elementor' ),
603 - /* translators: %s: Element type. */
604 - 'add_element' => __( 'Add %s', 'elementor' ),
605 - /* translators: %s: Element name. */
606 - 'edit_element' => __( 'Edit %s', 'elementor' ),
607 - /* translators: %s: Element type. */
608 - 'duplicate_element' => __( 'Duplicate %s', 'elementor' ),
609 - /* translators: %s: Element type. */
610 - 'delete_element' => __( 'Delete %s', 'elementor' ),
611 - 'flexbox_attention_header' => __( 'Note: Flexbox Changes', 'elementor' ),
612 - 'flexbox_attention_message' => __( 'Elementor 2.5 introduces key changes to the layout using CSS Flexbox. Your existing pages might have been affected, please review your page before publishing.', 'elementor' ),
613 - 'color_picker' => __( 'Color Picker', 'elementor' ),
614 -
615 - // Global Styles
616 - 'new_global_color' => __( 'New Global Color', 'elementor' ),
617 - 'global_colors_title' => __( 'Global Colors', 'elementor' ),
618 - 'manage_global_colors' => __( 'Manage Global Colors', 'elementor' ),
619 - 'create_global_color' => __( 'Create New Global Color', 'elementor' ),
620 - 'delete_global_color' => __( 'Delete Global Color', 'elementor' ),
621 - 'delete_global_color_info' => __( 'You\'re about to delete a Global Color. Note that if it\'s being used anywhere on your site, it will inherit a default color.', 'elementor' ),
622 - 'global_colors_info' => __( 'Global Colors help you work smarter. Save a color, and use it anywhere throughout your site. Access and edit your global colors by clicking the Manage button.', 'elementor' ),
623 - 'typography' => __( 'Typography', 'elementor' ),
624 - 'new_typography_setting' => __( 'New Typography Setting', 'elementor' ),
625 - 'global_fonts_title' => __( 'Global Fonts', 'elementor' ),
626 - 'manage_global_fonts' => __( 'Manage Global Fonts', 'elementor' ),
627 - 'create_global_font' => __( 'Create New Global Font', 'elementor' ),
628 - 'delete_global_font' => __( 'Delete Global Font', 'elementor' ),
629 - 'delete_global_font_info' => __( 'You\'re about to delete a Global Font. Note that if it\'s being used anywhere on your site, it will inherit a default typography.', 'elementor' ),
630 - 'global_fonts_info' => __( 'Global Fonts help you work smarter. Save a Typography, and use it anywhere throughout your site. Access and edit your Global Fonts by clicking the Manage button.', 'elementor' ),
631 - 'default' => __( 'Default', 'elementor' ),
632 - 'create' => __( 'Create', 'elementor' ),
633 - 'global_color_confirm_text' => __( 'Are you sure you want to create a new Global Color?', 'elementor' ),
634 - 'global_color_already_exists' => __( 'Please note that the same exact color already exists in your Global Colors list. Are you sure you want to create it?', 'elementor' ),
635 - 'global_color_name_already_exists' => __( 'Please note that a color with the same exact name already exists in your Global Colors list. Are you sure you want to create it?', 'elementor' ),
636 - 'global_fonts_confirm_text' => __( 'Are you sure you want to create a new Global Font setting?', 'elementor' ),
637 - 'custom' => __( 'Custom', 'elementor' ),
638 -
639 - // Menu.
640 - 'site_settings' => __( 'Site Settings', 'elementor' ),
641 - 'theme_builder' => __( 'Theme Builder', 'elementor' ),
642 - 'user_preferences' => __( 'User Preferences', 'elementor' ),
643 - 'settings' => __( 'Settings', 'elementor' ),
644 - 'more' => __( 'More', 'elementor' ),
645 - 'navigate_from_page' => __( 'Navigate From Page', 'elementor' ),
646 - 'view_page' => __( 'View Page', 'elementor' ),
647 - 'exit_to_dashboard' => __( 'Exit To Dashboard', 'elementor' ),
648 -
649 - // Elements.
650 - 'inner_section' => __( 'Inner Section', 'elementor' ),
651 -
652 - // Control Order.
653 - 'asc' => __( 'Ascending order', 'elementor' ),
654 - 'desc' => __( 'Descending order', 'elementor' ),
655 -
656 - // Clear Page.
657 - 'clear_page' => __( 'Delete All Content', 'elementor' ),
658 - 'dialog_confirm_clear_page' => __( 'Attention: We are going to DELETE ALL CONTENT from this page. Are you sure you want to do that?', 'elementor' ),
659 -
660 - // Enable unfiltered file uploads.
661 - 'enable_unfiltered_files_upload' => __( 'Enable Unfiltered File Uploads', 'elementor' ),
662 - 'dialog_confirm_enable_unfiltered_files_upload' => __( 'Before you enable unfiltered files upload, note that this kind of files include a security risk. Elementor does run a process to remove possible malicious code, but there is still risk involved when using such files.', 'elementor' ),
663 -
664 - // Enable fontawesome 5 if needed.
665 - 'enable_fa5' => __( 'Elementor\'s New Icon Library', 'elementor' ),
666 - 'dialog_confirm_enable_fa5' => __( 'Elementor v2.6 includes an upgrade from Font Awesome 4 to 5. In order to continue using icons, be sure to click "Upgrade".', 'elementor' ) . ' <a href="https://go.elementor.com/fontawesome-migration/" target="_blank">' . __( 'Learn More', 'elementor' ) . '</a>',
667 -
668 - // Panel Preview Mode.
669 - 'back_to_editor' => __( 'Show Panel', 'elementor' ),
670 - 'preview' => __( 'Hide Panel', 'elementor' ),
671 -
672 - // Inline Editing.
673 - 'type_here' => __( 'Type Here', 'elementor' ),
674 -
675 - // Library.
676 - 'an_error_occurred' => __( 'An error occurred', 'elementor' ),
677 - 'category' => __( 'Category', 'elementor' ),
678 - 'delete_template' => __( 'Delete Template', 'elementor' ),
679 - 'delete_template_confirm' => __( 'Are you sure you want to delete this template?', 'elementor' ),
680 - 'import_template_dialog_header' => __( 'Import Document Settings', 'elementor' ),
681 - 'import_template_dialog_message' => __( 'Do you want to also import the document settings of the template?', 'elementor' ),
682 - 'import_template_dialog_message_attention' => __( 'Attention: Importing may override previous settings.', 'elementor' ),
683 - 'library' => __( 'Library', 'elementor' ),
684 - 'no' => __( 'No', 'elementor' ),
685 - 'page' => __( 'Page', 'elementor' ),
686 - /* translators: %s: Template type. */
687 - 'save_your_template' => __( 'Save Your %s to Library', 'elementor' ),
688 - 'save_your_template_description' => __( 'Your designs will be available for export and reuse on any page or website', 'elementor' ),
689 - 'section' => __( 'Section', 'elementor' ),
690 - 'templates_empty_message' => __( 'This is where your templates should be. Design it. Save it. Reuse it.', 'elementor' ),
691 - 'templates_empty_title' => __( 'Haven’t Saved Templates Yet?', 'elementor' ),
692 - 'templates_no_favorites_message' => __( 'You can mark any pre-designed template as a favorite.', 'elementor' ),
693 - 'templates_no_favorites_title' => __( 'No Favorite Templates', 'elementor' ),
694 - 'templates_no_results_message' => __( 'Please make sure your search is spelled correctly or try a different words.', 'elementor' ),
695 - 'templates_no_results_title' => __( 'No Results Found', 'elementor' ),
696 - 'templates_request_error' => __( 'The following error(s) occurred while processing the request:', 'elementor' ),
697 - 'yes' => __( 'Yes', 'elementor' ),
698 - 'blocks' => __( 'Blocks', 'elementor' ),
699 - 'pages' => __( 'Pages', 'elementor' ),
700 - 'my_templates' => __( 'My Templates', 'elementor' ),
701 -
702 - // Incompatible Device.
703 - 'device_incompatible_header' => __( 'Your browser isn\'t compatible', 'elementor' ),
704 - 'device_incompatible_message' => __( 'Your browser isn\'t compatible with all of Elementor\'s editing features. We recommend you switch to another browser like Chrome or Firefox.', 'elementor' ),
705 - 'proceed_anyway' => __( 'Proceed Anyway', 'elementor' ),
706 -
707 - // Preview not loaded.
708 - 'learn_more' => __( 'Learn More', 'elementor' ),
709 - 'preview_el_not_found_header' => __( 'Sorry, the content area was not found in your page.', 'elementor' ),
710 - 'preview_el_not_found_message' => __( 'You must call \'the_content\' function in the current template, in order for Elementor to work on this page.', 'elementor' ),
711 -
712 - // Gallery.
713 - 'delete_gallery' => __( 'Reset Gallery', 'elementor' ),
714 - 'dialog_confirm_gallery_delete' => __( 'Are you sure you want to reset this gallery?', 'elementor' ),
715 - /* translators: %s: The number of images. */
716 - 'gallery_images_selected' => __( '%s Images Selected', 'elementor' ),
717 - 'gallery_no_images_selected' => __( 'No Images Selected', 'elementor' ),
718 - 'insert_media' => __( 'Insert Media', 'elementor' ),
719 -
720 - // Take Over.
721 - /* translators: %s: User name. */
722 - 'dialog_user_taken_over' => __( '%s has taken over and is currently editing. Do you want to take over this page editing?', 'elementor' ),
723 - 'go_back' => __( 'Go Back', 'elementor' ),
724 - 'take_over' => __( 'Take Over', 'elementor' ),
725 -
726 - // Revisions.
727 - /* translators: %s: Template type. */
728 - 'dialog_confirm_delete' => __( 'Are you sure you want to remove this %s?', 'elementor' ),
729 -
730 - // Saver.
731 - 'before_unload_alert' => __( 'Please note: All unsaved changes will be lost.', 'elementor' ),
732 - 'published' => __( 'Published', 'elementor' ),
733 - 'publish' => __( 'Publish', 'elementor' ),
734 - 'save' => __( 'Save', 'elementor' ),
735 - 'saved' => __( 'Saved', 'elementor' ),
736 - 'update' => __( 'Update', 'elementor' ),
737 - 'enable' => __( 'Enable', 'elementor' ),
738 - 'submit' => __( 'Submit', 'elementor' ),
739 - 'working_on_draft_notification' => __( 'This is just a draft. Play around and when you\'re done - click update.', 'elementor' ),
740 - 'keep_editing' => __( 'Keep Editing', 'elementor' ),
741 - 'have_a_look' => __( 'Have a look', 'elementor' ),
742 - 'view_all_revisions' => __( 'View All Revisions', 'elementor' ),
743 - 'dismiss' => __( 'Dismiss', 'elementor' ),
744 - 'saving_disabled' => __( 'Saving has been disabled until you’re reconnected.', 'elementor' ),
745 -
746 - // Ajax
747 - 'server_error' => __( 'Server Error', 'elementor' ),
748 - 'server_connection_lost' => __( 'Connection Lost', 'elementor' ),
749 - 'unknown_error' => __( 'Unknown Error', 'elementor' ),
750 -
751 - // Context Menu
752 - 'duplicate' => __( 'Duplicate', 'elementor' ),
753 - 'copy' => __( 'Copy', 'elementor' ),
754 - 'paste' => __( 'Paste', 'elementor' ),
755 - 'copy_style' => __( 'Copy Style', 'elementor' ),
756 - 'paste_style' => __( 'Paste Style', 'elementor' ),
757 - 'reset_style' => __( 'Reset Style', 'elementor' ),
758 - 'save_as_global' => __( 'Save as a Global', 'elementor' ),
759 - 'save_as_block' => __( 'Save as Template', 'elementor' ),
760 - 'new_column' => __( 'Add New Column', 'elementor' ),
761 - 'copy_all_content' => __( 'Copy All Content', 'elementor' ),
762 - 'delete_all_content' => __( 'Delete All Content', 'elementor' ),
763 - 'navigator' => __( 'Navigator', 'elementor' ),
764 -
765 - // Right Click Introduction
766 - 'meet_right_click_header' => __( 'Meet Right Click', 'elementor' ),
767 - 'meet_right_click_message' => __( 'Now you can access all editing actions using right click.', 'elementor' ),
768 -
769 - // Hotkeys screen
770 - 'keyboard_shortcuts' => __( 'Keyboard Shortcuts', 'elementor' ),
771 -
772 - // Deprecated Control
773 - 'deprecated_notice' => __( 'The <strong>%1$s</strong> widget has been deprecated since %2$s %3$s.', 'elementor' ),
774 - 'deprecated_notice_replacement' => __( 'It has been replaced by <strong>%1$s</strong>.', 'elementor' ),
775 - 'deprecated_notice_last' => __( 'Note that %1$s will be completely removed once %2$s %3$s is released.', 'elementor' ),
776 -
777 - //Preview Debug
778 - 'preview_debug_link_text' => __( 'Click here for preview debug', 'elementor' ),
779 -
780 - 'icon_library' => __( 'Icon Library', 'elementor' ),
781 - 'my_libraries' => __( 'My Libraries', 'elementor' ),
782 - 'upload' => __( 'Upload', 'elementor' ),
783 - 'icons_promotion' => __( 'Become a Pro user to upload unlimited font icon folders to your website.', 'elementor' ),
784 - 'go_pro' => __( 'Go Pro', 'elementor' ),
785 - 'custom_positioning' => __( 'Custom Positioning', 'elementor' ),
786 -
787 - 'element_promotion_dialog_header' => __( '%s Widget', 'elementor' ),
788 - 'element_promotion_dialog_message' => __( 'Use %s widget and dozens more pro features to extend your toolbox and build sites faster and better.', 'elementor' ),
789 - 'see_it_in_action' => __( 'See it in Action', 'elementor' ),
790 - 'dynamic_content' => __( 'Dynamic Content', 'elementor' ),
791 - 'dynamic_promotion_message' => __( 'Create more personalized and dynamic sites by populating data from various sources with dozens of dynamic tags to choose from.', 'elementor' ),
792 -
793 - // TODO: Remove.
794 - 'autosave' => __( 'Autosave', 'elementor' ),
795 - 'elementor_docs' => __( 'Documentation', 'elementor' ),
796 - 'reload_page' => __( 'Reload Page', 'elementor' ),
797 - 'session_expired_header' => __( 'Timeout', 'elementor' ),
798 - 'session_expired_message' => __( 'Your session has expired. Please reload the page to continue editing.', 'elementor' ),
799 - 'soon' => __( 'Soon', 'elementor' ),
800 - 'unknown_value' => __( 'Unknown Value', 'elementor' ),
801 - ],
592 + 'experimentalFeatures' => $active_experimental_features,
802 593 ];
803 594
804 595 if ( ! Utils::has_pro() && current_user_can( 'manage_options' ) ) {
805 596 $config['promotionWidgets'] = Api::get_promotion_widgets();
@@ -821,8 +612,10 @@
821 612
822 613 Utils::print_js_config( 'elementor-editor', 'ElementorConfig', $config );
823 614
824 615 wp_enqueue_script( 'elementor-editor' );
616 +
617 + wp_set_script_translations( 'elementor-editor', 'elementor' );
825 618
826 619 $plugin->controls_manager->enqueue_control_scripts();
827 620
828 621 /**