| @@ -1,7 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor; |
| 3 | 3 | |
| 4 | +use Elementor\Core\Editor\Editor; | |
| 4 | 5 | use Elementor\Utils; |
| 5 | 6 | use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager; |
| 6 | 7 | |
| 7 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -7,8 +8,10 @@ | ||
| 7 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 8 | 9 | exit; // Exit if accessed directly. |
| 9 | 10 | } |
| 10 | 11 | |
| 12 | +$is_editor_v2_active = Plugin::$instance->experiments->is_feature_active( Editor::EDITOR_V2_EXPERIMENT_NAME ); | |
| 13 | + | |
| 11 | 14 | $has_pro = Utils::has_pro(); |
| 12 | 15 | $elements_list_class = ''; |
| 13 | 16 | |
| 14 | 17 | if ( ! $has_pro ) { |
| @@ -28,14 +31,24 @@ | ||
| 28 | 31 | |
| 29 | 32 | ?> |
| 30 | 33 | <script type="text/template" id="tmpl-elementor-navigator"> |
| 31 | 34 | <div id="elementor-navigator__header"> |
| 32 | - <button id="elementor-navigator__toggle-all" data-elementor-action="expand" aria-label="<?php echo esc_attr__( 'Expand all elements', 'elementor' ); ?>"> | |
| 35 | + <button id="elementor-navigator__toggle-all" data-elementor-action="expand"> | |
| 33 | 36 | <i class="eicon-expand" aria-hidden="true"></i> |
| 37 | + <span class="elementor-screen-only"><?php esc_html__( 'Expand all elements', 'elementor' ); ?></span> | |
| 34 | 38 | </button> |
| 35 | - <h2 id="elementor-navigator__header__title"><?php echo esc_html__( 'Structure', 'elementor' ); ?></h2> | |
| 36 | - <button id="elementor-navigator__close" aria-label="<?php echo esc_attr__( 'Close structure', 'elementor' ); ?>"> | |
| 39 | + <h2 id="elementor-navigator__header__title"><?php | |
| 40 | + echo $is_editor_v2_active | |
| 41 | + ? esc_html__( 'Structure', 'elementor' ) | |
| 42 | + : esc_html__( 'Navigator', 'elementor' ); | |
| 43 | + ?></h2> | |
| 44 | + <button id="elementor-navigator__close"> | |
| 37 | 45 | <i class="eicon-close" aria-hidden="true"></i> |
| 46 | + <span class="elementor-screen-only"><?php | |
| 47 | + echo $is_editor_v2_active | |
| 48 | + ? esc_html__( 'Close structure', 'elementor' ) | |
| 49 | + : esc_html__( 'Close navigator', 'elementor' ); | |
| 50 | + ?></span> | |
| 38 | 51 | </button> |
| 39 | 52 | </div> |
| 40 | 53 | <div id="elementor-navigator__elements" |
| 41 | 54 | <?php if ( ! empty( $elements_list_class ) ) : ?> |
| @@ -45,18 +58,20 @@ | ||
| 45 | 58 | </div> |
| 46 | 59 | <div id="elementor-navigator__footer"> |
| 47 | 60 | <?php if ( ! $has_pro && ! empty( $promotion_data ) ) : ?> |
| 48 | 61 | <div id="elementor-navigator__footer__promotion"> |
| 49 | - <div class="elementor-navigator__promotion-text"> | |
| 50 | - <?php echo esc_attr( $promotion_data['text'] ); ?>. | |
| 51 | - <a href="<?php echo esc_url( $promotion_data['url'] ); ?>" target="_blank" class="e-link-promotion"><?php echo esc_attr( $promotion_data['url_label'] ); ?></a> | |
| 52 | - </div> | |
| 62 | + <?php echo esc_attr( $promotion_data['text'] ); ?>. | |
| 63 | + <a href="<?php echo esc_url( $promotion_data['url'] ); ?>" target="_blank" class="e-link-promotion"><?php echo esc_attr( $promotion_data['url_label'] ); ?></a> | |
| 53 | 64 | </div> |
| 54 | 65 | <?php endif; ?> |
| 55 | 66 | |
| 56 | 67 | <div id="elementor-navigator__footer__resize-bar"> |
| 57 | 68 | <i class="eicon-ellipsis-h" aria-hidden="true"></i> |
| 58 | - <span class="elementor-screen-only"><?php echo esc_html__( 'Resize structure', 'elementor' ); ?></span> | |
| 69 | + <span class="elementor-screen-only"><?php | |
| 70 | + echo $is_editor_v2_active | |
| 71 | + ? esc_html__( 'Resize structure', 'elementor' ) | |
| 72 | + : esc_html__( 'Resize navigator', 'elementor' ); | |
| 73 | + ?></span> | |
| 59 | 74 | </div> |
| 60 | 75 | </div> |
| 61 | 76 | </script> |
| 62 | 77 | |