| @@ -1,12 +1,15 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor; |
| 3 | 3 | |
| 4 | +use Elementor\Core\Editor\Editor; | |
| 5 | + | |
| 4 | 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 5 | 7 | exit; // Exit if accessed directly. |
| 6 | 8 | } |
| 7 | 9 | |
| 8 | 10 | $document = Plugin::$instance->documents->get( Plugin::$instance->editor->get_post_id() ); |
| 11 | +$is_editor_v2_active = Plugin::$instance->experiments->is_feature_active( Editor::EDITOR_V2_EXPERIMENT_NAME ); | |
| 9 | 12 | ?> |
| 10 | 13 | <script type="text/template" id="tmpl-elementor-panel"> |
| 11 | 14 | <div id="elementor-panel-state-loading"> |
| 12 | 15 | <i class="eicon-loading eicon-animation-spin"></i> |
| @@ -51,10 +54,10 @@ | ||
| 51 | 54 | |
| 52 | 55 | <script type="text/template" id="tmpl-elementor-exit-dialog"> |
| 53 | 56 | <div><?php echo esc_html__( 'Now you can choose where you want to go on the site from the following options', 'elementor' ); ?></div> |
| 54 | 57 | <div> |
| 55 | - <?php printf( | |
| 56 | - /* translators: 1: Opening HTML <a> tag, 2: closing HTML <a> tag. */ | |
| 58 | + <!-- translators: 1: Opening HTML <a> tag, 2: closing HTML <a> tag. --> | |
| 59 | + <?php echo sprintf( | |
| 57 | 60 | esc_html__( 'Any time you can change the settings in %1$sUser Preferences%2$s', 'elementor' ), |
| 58 | 61 | '<a id="user-preferences">', |
| 59 | 62 | '</a>' |
| 60 | 63 | ); ?> |
| @@ -62,46 +65,54 @@ | ||
| 62 | 65 | <select id="exit-to-preferences"></select> <!-- Adding options by JS --> |
| 63 | 66 | </script> |
| 64 | 67 | |
| 65 | 68 | <script type="text/template" id="tmpl-elementor-panel-header"> |
| 66 | - <button id="elementor-panel-header-menu-button" class="elementor-header-button" aria-label="<?php echo esc_attr__( 'Menu', 'elementor' ); ?>"> | |
| 67 | - <i class="elementor-icon eicon-menu-bar tooltip-target" aria-hidden="true" data-tooltip="<?php echo esc_attr__( 'Menu', 'elementor' ); ?>"></i> | |
| 69 | + <button id="elementor-panel-header-menu-button" class="elementor-header-button"> | |
| 70 | + <i class="elementor-icon eicon-menu-bar tooltip-target" aria-hidden="true" data-tooltip="<?php esc_attr_e( 'Menu', 'elementor' ); ?>"></i> | |
| 71 | + <span class="elementor-screen-only"><?php echo esc_html__( 'Menu', 'elementor' ); ?></span> | |
| 68 | 72 | </button> |
| 69 | 73 | <h2 id="elementor-panel-header-title"></h2> |
| 70 | - <# const extraClass = $e.components.get( 'document/elements' ).utils.allowAddingWidgets() ? '' : 'elementor-visibility-hidden'; #> | |
| 71 | - <button id="elementor-panel-header-add-button" class="elementor-header-button {{{ extraClass }}}" aria-label="<?php echo esc_attr__( 'Widgets Panel', 'elementor' ); ?>"> | |
| 72 | - <i class="elementor-icon eicon-apps tooltip-target" aria-hidden="true" data-tooltip="<?php echo esc_attr__( 'Widgets Panel', 'elementor' ); ?>"></i> | |
| 74 | + <button id="elementor-panel-header-add-button" class="elementor-header-button"> | |
| 75 | + <i class="elementor-icon eicon-apps tooltip-target" aria-hidden="true" data-tooltip="<?php esc_attr_e( 'Widgets Panel', 'elementor' ); ?>"></i> | |
| 76 | + <span class="elementor-screen-only"><?php echo esc_html__( 'Widgets Panel', 'elementor' ); ?></span> | |
| 73 | 77 | </button> |
| 74 | 78 | </script> |
| 75 | 79 | |
| 76 | 80 | <script type="text/template" id="tmpl-elementor-panel-footer-content"> |
| 77 | - <button id="elementor-panel-footer-settings" class="elementor-panel-footer-tool elementor-leave-open tooltip-target" data-tooltip="<?php echo esc_attr__( 'Settings', 'elementor' ); ?>" aria-label="<?php | |
| 78 | - printf( | |
| 79 | - /* translators: %s: Document title. */ | |
| 80 | - esc_attr__( '%s Settings', 'elementor' ), | |
| 81 | - esc_attr( $document::get_title() ) | |
| 82 | - ); ?>"> | |
| 81 | + <button id="elementor-panel-footer-settings" class="elementor-panel-footer-tool elementor-leave-open tooltip-target" data-tooltip="<?php esc_attr_e( 'Settings', 'elementor' ); ?>"> | |
| 83 | 82 | <i class="eicon-cog" aria-hidden="true"></i> |
| 83 | + <span class="elementor-screen-only"><?php printf( esc_html__( '%s Settings', 'elementor' ), esc_html( $document::get_title() ) ); ?></span> | |
| 84 | 84 | </button> |
| 85 | - <# if ( $e.components.get( 'document/elements' ).utils.showNavigator() ) { #> | |
| 86 | - <button id="elementor-panel-footer-navigator" class="elementor-panel-footer-tool tooltip-target" data-tooltip="<?php echo esc_attr__( 'Structure', 'elementor' ); ?>" aria-label="<?php echo esc_attr__( 'Structure', 'elementor' ); ?>"> | |
| 85 | + <button id="elementor-panel-footer-navigator" class="elementor-panel-footer-tool tooltip-target" data-tooltip="<?php | |
| 86 | + echo $is_editor_v2_active | |
| 87 | + ? esc_attr__( 'Structure', 'elementor' ) | |
| 88 | + : esc_attr__( 'Navigator', 'elementor' ); | |
| 89 | + ?>"> | |
| 87 | 90 | <i class="eicon-navigator" aria-hidden="true"></i> |
| 91 | + <span class="elementor-screen-only"><?php | |
| 92 | + echo $is_editor_v2_active | |
| 93 | + ? esc_html__( 'Structure', 'elementor' ) | |
| 94 | + : esc_html__( 'Navigator', 'elementor' ); | |
| 95 | + ?></span> | |
| 88 | 96 | </button> |
| 89 | - <# } #> | |
| 90 | - <button id="elementor-panel-footer-history" class="elementor-panel-footer-tool elementor-leave-open tooltip-target" data-tooltip="<?php echo esc_attr__( 'History', 'elementor' ); ?>" aria-label="<?php echo esc_attr__( 'History', 'elementor' ); ?>"> | |
| 97 | + <button id="elementor-panel-footer-history" class="elementor-panel-footer-tool elementor-leave-open tooltip-target" data-tooltip="<?php esc_attr_e( 'History', 'elementor' ); ?>"> | |
| 91 | 98 | <i class="eicon-history" aria-hidden="true"></i> |
| 99 | + <span class="elementor-screen-only"><?php echo esc_html__( 'History', 'elementor' ); ?></span> | |
| 92 | 100 | </button> |
| 93 | - <button id="elementor-panel-footer-responsive" class="elementor-panel-footer-tool elementor-toggle-state tooltip-target" data-tooltip="<?php echo esc_attr__( 'Responsive Mode', 'elementor' ); ?>" aria-label="<?php echo esc_attr__( 'Responsive Mode', 'elementor' ); ?>"> | |
| 101 | + <button id="elementor-panel-footer-responsive" class="elementor-panel-footer-tool elementor-toggle-state tooltip-target" data-tooltip="<?php esc_attr_e( 'Responsive Mode', 'elementor' ); ?>"> | |
| 94 | 102 | <i class="eicon-device-responsive" aria-hidden="true"></i> |
| 103 | + <span class="elementor-screen-only"> | |
| 104 | + <?php echo esc_html__( 'Responsive Mode', 'elementor' ); ?> | |
| 105 | + </span> | |
| 95 | 106 | </button> |
| 96 | - <button id="elementor-panel-footer-saver-preview" class="elementor-panel-footer-tool tooltip-target" data-tooltip="<?php echo esc_attr__( 'Preview Changes', 'elementor' ); ?>" aria-label="<?php echo esc_attr__( 'Preview Changes', 'elementor' ); ?>"> | |
| 107 | + <button id="elementor-panel-footer-saver-preview" class="elementor-panel-footer-tool tooltip-target" data-tooltip="<?php esc_attr_e( 'Preview Changes', 'elementor' ); ?>"> | |
| 97 | 108 | <span id="elementor-panel-footer-saver-preview-label"> |
| 98 | 109 | <i class="eicon-preview-medium" aria-hidden="true"></i> |
| 110 | + <span class="elementor-screen-only"><?php echo esc_html__( 'Preview Changes', 'elementor' ); ?></span> | |
| 99 | 111 | </span> |
| 100 | 112 | </button> |
| 101 | 113 | <div id="elementor-panel-footer-saver-publish" class="elementor-panel-footer-tool"> |
| 102 | - <# const publishTitle = $e.components.get( 'document/elements' ).utils.getTitleForPublishButton(); #> | |
| 103 | - <button id="elementor-panel-saver-button-publish" class="elementor-button e-primary elementor-disabled" title="{{{ publishTitle }}}"> | |
| 114 | + <button id="elementor-panel-saver-button-publish" class="elementor-button e-primary elementor-disabled"> | |
| 104 | 115 | <span class="elementor-state-icon"> |
| 105 | 116 | <i class="eicon-loading eicon-animation-spin" aria-hidden="true"></i> |
| 106 | 117 | </span> |
| 107 | 118 | <span id="elementor-panel-saver-button-publish-label"> |
| @@ -109,10 +120,11 @@ | ||
| 109 | 120 | </span> |
| 110 | 121 | </button> |
| 111 | 122 | </div> |
| 112 | 123 | <div id="elementor-panel-footer-saver-options" class="elementor-panel-footer-tool elementor-toggle-state"> |
| 113 | - <button id="elementor-panel-saver-button-save-options" class="elementor-button e-primary tooltip-target elementor-disabled" data-tooltip="<?php echo esc_attr__( 'Save Options', 'elementor' ); ?>" data-tooltip-offset="7" aria-label="<?php echo esc_attr__( 'Save Options', 'elementor' ); ?>"> | |
| 124 | + <button id="elementor-panel-saver-button-save-options" class="elementor-button e-primary tooltip-target elementor-disabled" data-tooltip="<?php esc_attr_e( 'Save Options', 'elementor' ); ?>" data-tooltip-offset="7"> | |
| 114 | 125 | <i class="eicon-chevron-right" aria-hidden="true"></i> |
| 126 | + <span class="elementor-screen-only"><?php echo esc_html__( 'Save Options', 'elementor' ); ?></span> | |
| 115 | 127 | </button> |
| 116 | 128 | <div class="elementor-panel-footer-sub-menu-wrapper"> |
| 117 | 129 | <p class="elementor-last-edited-wrapper"> |
| 118 | 130 | <span class="elementor-state-icon"> |
| @@ -129,14 +141,8 @@ | ||
| 129 | 141 | <div id="elementor-panel-footer-sub-menu-item-save-template" class="elementor-panel-footer-sub-menu-item"> |
| 130 | 142 | <i class="elementor-icon eicon-folder" aria-hidden="true"></i> |
| 131 | 143 | <span class="elementor-title"><?php echo esc_html__( 'Save as Template', 'elementor' ); ?></span> |
| 132 | 144 | </div> |
| 133 | - <# if ( $e.components.get( 'document/elements' ).utils.showCopyAndShareButton() ) { #> | |
| 134 | - <div id="elementor-panel-footer-sub-menu-item-copy-share-link" class="elementor-panel-footer-sub-menu-item"> | |
| 135 | - <i class="elementor-icon eicon-link" aria-hidden="true"></i> | |
| 136 | - <span class="elementor-title"><?php echo esc_html__( 'Copy and Share Link', 'elementor' ); ?></span> | |
| 137 | - </div> | |
| 138 | - <# } #> | |
| 139 | 145 | </div> |
| 140 | 146 | </div> |
| 141 | 147 | </div> |
| 142 | 148 | </script> |
| @@ -141,10 +147,10 @@ | ||
| 141 | 147 | </div> |
| 142 | 148 | </script> |
| 143 | 149 | |
| 144 | 150 | <script type="text/template" id="tmpl-elementor-mode-switcher-content"> |
| 145 | - <label for="elementor-mode-switcher-preview-input" id="elementor-mode-switcher-preview" title="<?php echo esc_attr__( 'Hide Panel', 'elementor' ); ?>"> | |
| 146 | - <i class="eicon eicon-angle-left" aria-hidden="true" tabindex="0"></i> | |
| 151 | + <label for="elementor-mode-switcher-preview-input" id="elementor-mode-switcher-preview" title="<?php esc_attr_e( 'Hide Panel', 'elementor' ); ?>"> | |
| 152 | + <i class="eicon" aria-hidden="true" tabindex="0"></i> | |
| 147 | 153 | <span class="elementor-screen-only"><?php echo esc_html__( 'Hide Panel', 'elementor' ); ?></span> |
| 148 | 154 | </label> |
| 149 | 155 | <input id="elementor-mode-switcher-preview-input" type="checkbox"> |
| 150 | 156 | </script> |
| @@ -178,29 +184,12 @@ | ||
| 178 | 184 | <i class="eicon-help-o" aria-hidden="true"></i> |
| 179 | 185 | </a> |
| 180 | 186 | </div> |
| 181 | 187 | <# } #> |
| 182 | - | |
| 183 | - <# if ( elementData.upsale_data && elementData.upsale_data.condition ) { #> | |
| 184 | - <div class="elementor-nerd-box elementor-nerd-box--upsale"> | |
| 185 | - <# if ( elementData.upsale_data.image ) { #> | |
| 186 | - <img class="elementor-nerd-box-icon" src="{{ elementData.upsale_data.image }}" loading="lazy" alt="{{ elementData.upsale_data.image_alt }}" /> | |
| 187 | - <# } #> | |
| 188 | - <# if ( elementData.upsale_data.title ) { #> | |
| 189 | - <div class="elementor-nerd-box-title">{{{ elementData.upsale_data.title }}}</div> | |
| 190 | - <# } #> | |
| 191 | - <# if ( elementData.upsale_data.description ) { #> | |
| 192 | - <div class="elementor-nerd-box-message">{{{ elementData.upsale_data.description }}}</div> | |
| 193 | - <# } #> | |
| 194 | - <# if ( elementData.upsale_data.upgrade_url && elementData.upsale_data.upgrade_text ) { #> | |
| 195 | - <a class="elementor-button go-pro" href="{{ elementData.upsale_data.upgrade_url }}" target="_blank">{{{ elementData.upsale_data.upgrade_text }}}</a> | |
| 196 | - <# } #> | |
| 197 | - </div> | |
| 198 | - <# } #> | |
| 199 | 188 | </script> |
| 200 | 189 | |
| 201 | 190 | <script type="text/template" id="tmpl-elementor-panel-schemes-disabled"> |
| 202 | - <img class="elementor-nerd-box-icon" src="<?php Utils::print_unescaped_internal_string( ELEMENTOR_ASSETS_URL . 'images/information.svg' ); ?>" loading="lazy" alt="<?php echo esc_attr__( 'Elementor', 'elementor' ); ?>" /> | |
| 191 | + <img class="elementor-nerd-box-icon" src="<?php Utils::print_unescaped_internal_string( ELEMENTOR_ASSETS_URL . 'images/information.svg' ); ?>" loading="lazy" /> | |
| 203 | 192 | <div class="elementor-nerd-box-title">{{{ '<?php echo esc_html__( '%s are disabled', 'elementor' ); // phpcs:ignore WordPress.WP.I18n.MissingTranslatorsComment ?>'.replace( '%s', disabledTitle ) }}}</div> |
| 204 | 193 | <div class="elementor-nerd-box-message"><?php |
| 205 | 194 | printf( |
| 206 | 195 | /* translators: %1$s Link open tag, %2$s: Link close tag. */ |
| @@ -218,9 +207,9 @@ | ||
| 218 | 207 | |
| 219 | 208 | <script type="text/template" id="tmpl-elementor-panel-scheme-typography-item"> |
| 220 | 209 | <div class="elementor-panel-heading"> |
| 221 | 210 | <div class="elementor-panel-heading-toggle"> |
| 222 | - <i class="eicon-caret-right" aria-hidden="true"></i> | |
| 211 | + <i class="eicon" aria-hidden="true"></i> | |
| 223 | 212 | </div> |
| 224 | 213 | <div class="elementor-panel-heading-title">{{{ title }}}</div> |
| 225 | 214 | </div> |
| 226 | 215 | <div class="elementor-panel-scheme-typography-items elementor-panel-box-content"> |
| @@ -276,10 +265,11 @@ | ||
| 276 | 265 | // The 'Desktop' label is made accessible via the global config because it needs to be translated. |
| 277 | 266 | var deviceLabel = 'desktop' === device ? '<?php esc_html_e( 'Desktop', 'elementor' ); ?>' : activeBreakpoints[ device ].label, |
| 278 | 267 | tooltipDir = "<?php echo is_rtl() ? 'e' : 'w'; ?>"; |
| 279 | 268 | #> |
| 280 | - <button class="elementor-responsive-switcher tooltip-target elementor-responsive-switcher-{{ device }}" data-device="{{ device }}" data-tooltip="{{ deviceLabel }}" data-tooltip-pos="{{ tooltipDir }}" aria-label="{{ deviceLabel }}"> | |
| 269 | + <button class="elementor-responsive-switcher tooltip-target elementor-responsive-switcher-{{ device }}" data-device="{{ device }}" data-tooltip="{{ deviceLabel }}" data-tooltip-pos="{{ tooltipDir }}"> | |
| 281 | 270 | <i class="{{ elementor.config.responsive.icons_map[ device ] }}" aria-hidden="true"></i> |
| 271 | + <span class="elementor-screen-only">{{ deviceLabel }}</span> | |
| 282 | 272 | </button> |
| 283 | 273 | <# } ); |
| 284 | 274 | #> |
| 285 | 275 | </div> |
| @@ -286,17 +276,18 @@ | ||
| 286 | 276 | </div> |
| 287 | 277 | </script> |
| 288 | 278 | |
| 289 | 279 | <script type="text/template" id="tmpl-elementor-control-dynamic-switcher"> |
| 290 | - <button class="elementor-control-dynamic-switcher elementor-control-unit-1" data-tooltip="<?php echo esc_attr__( 'Dynamic Tags', 'elementor' ); ?>" aria-label="<?php echo esc_attr__( 'Dynamic Tags', 'elementor' ); ?>"> | |
| 280 | + <div class="elementor-control-dynamic-switcher elementor-control-unit-1" data-tooltip="<?php echo esc_attr__( 'Dynamic Tags', 'elementor' ); ?>"> | |
| 291 | 281 | <i class="eicon-database" aria-hidden="true"></i> |
| 292 | - </button> | |
| 282 | + <span class="elementor-screen-only"><?php echo esc_html__( 'Dynamic Tags', 'elementor' ); ?></span> | |
| 283 | + </div> | |
| 293 | 284 | </script> |
| 294 | - | |
| 295 | 285 | <script type="text/template" id="tmpl-elementor-control-element-color-picker"> |
| 296 | - <button class="elementor-control-element-color-picker e-control-tool" data-tooltip="<?php echo esc_attr__( 'Color Sampler', 'elementor' ); ?>" aria-label="<?php echo esc_attr__( 'Color Sampler', 'elementor' ); ?>"> | |
| 286 | + <div class="elementor-control-element-color-picker e-control-tool" data-tooltip="<?php echo esc_attr__( 'Color Sampler', 'elementor' ); ?>"> | |
| 297 | 287 | <i class="eicon-eyedropper" aria-hidden="true"></i> |
| 298 | - </button> | |
| 288 | + <span class="elementor-screen-only"><?php echo esc_html__( 'Color Sampler', 'elementor' ); ?></span> | |
| 289 | + </div> | |
| 299 | 290 | </script> |
| 300 | 291 | |
| 301 | 292 | <script type="text/template" id="tmpl-elementor-control-dynamic-cover"> |
| 302 | 293 | <div class="elementor-dynamic-cover__settings"> |