← All changes
|
includes/editor-templates/panel-elements.php
+12
-14
4.3.0-beta3
→
4.1.4
View file →
| @@ -61,9 +61,9 @@ | ||
| 61 | 61 | <?php do_action( 'elementor/editor/templates/panel/category' ); ?> |
| 62 | 62 | <# if ( 'undefined' !== typeof promotion && promotion ) { #> |
| 63 | 63 | <span class="elementor-panel-heading-promotion"> |
| 64 | 64 | <a href="{{{ promotion.url }}}" target="_blank"> |
| 65 | - <i class="eicon-upgrade-crown-full"></i>{{{ promotion.text || <?php echo wp_json_encode( __( 'Upgrade', 'elementor' ) ); ?> }}} | |
| 65 | + <i class="eicon-upgrade-crown-full"></i><?php echo esc_html__( 'Upgrade', 'elementor' ); ?> | |
| 66 | 66 | </a> |
| 67 | 67 | </span> |
| 68 | 68 | <# } #> |
| 69 | 69 | </button> |
| @@ -82,16 +82,12 @@ | ||
| 82 | 82 | <# const v4Categories = ['v4-elements', 'atomic-form']; #> |
| 83 | 83 | <button class="elementor-element" data-library-element-type="{{ elType === 'widget' ? widgetType : elType }}"> |
| 84 | 84 | <# if ( obj.integration ) { #> |
| 85 | 85 | <i class="eicon-plug"></i> |
| 86 | - <# } else if ( false === obj.editable ) { #> | |
| 87 | - <i class="eicon-lock"></i> | |
| 88 | - <# } else if ( obj.categories.some( category => v4Categories.includes( category ) ) ) { #> | |
| 89 | - <# if ( obj.isNew ) { #> | |
| 90 | - <span class="e-widget-new-badge" aria-label="<?php echo esc_attr__( 'New', 'elementor' ); ?>"><?php echo esc_html__( 'New', 'elementor' ); ?></span> | |
| 91 | - <# } else { #> | |
| 92 | - <i class="eicon-atomic"></i> | |
| 93 | - <# } #> | |
| 86 | + <# } else if ( false === obj.editable && !obj.birthdayEasterEgg ) { #> | |
| 87 | + <i class="eicon-upgrade-crown-full"></i> | |
| 88 | + <# } else if ( !obj.birthdayEasterEgg && obj.categories.some( category => v4Categories.includes( category ) ) ) { #> | |
| 89 | + <i class="eicon-atomic"></i> | |
| 94 | 90 | <# } #> |
| 95 | 91 | <div class="icon"> |
| 96 | 92 | <i class="{{ icon }}" aria-hidden="true"></i> |
| 97 | 93 | </div> |
| @@ -100,13 +96,14 @@ | ||
| 100 | 96 | </div> |
| 101 | 97 | </button> |
| 102 | 98 | </script> |
| 103 | 99 | |
| 104 | -<?php | |
| 105 | -$widget_creation_cta_text = Hints::is_plugin_active( 'angie' ) | |
| 106 | - ? __( 'Create custom widget', 'elementor' ) | |
| 107 | - : __( 'Try for free', 'elementor' ); | |
| 108 | -?> | |
| 100 | +<?php if ( Plugin::$instance->experiments->is_feature_active( Modules\WidgetCreation\Module::EXPERIMENT_NAME ) ) : ?> | |
| 101 | + <?php | |
| 102 | + $widget_creation_cta_text = Hints::is_plugin_active( 'angie' ) | |
| 103 | + ? __( 'Create custom widget', 'elementor' ) | |
| 104 | + : __( 'Try for free', 'elementor' ); | |
| 105 | + ?> | |
| 109 | 106 | <script type="text/template" id="tmpl-elementor-panel-elements-widget-creation-empty-state"> |
| 110 | 107 | <div class="elementor-panel-elements-widget-creation__title"><?php echo esc_html__( 'No widget found for', 'elementor' ); ?> "{{{ searchTerm }}}"</div> |
| 111 | 108 | <div class="elementor-panel-elements-widget-creation__message"><?php echo esc_html__( 'Build a custom widget with Angie by describing what you need.', 'elementor' ); ?></div> |
| 112 | 109 | <?php if ( current_user_can( 'manage_options' ) ) : ?> |
| @@ -120,8 +117,9 @@ | ||
| 120 | 117 | <?php if ( current_user_can( 'manage_options' ) ) : ?> |
| 121 | 118 | <button type="button" class="elementor-panel-elements-widget-creation__cta"><?php echo esc_html( $widget_creation_cta_text ); ?></button> |
| 122 | 119 | <?php endif; ?> |
| 123 | 120 | </script> |
| 121 | +<?php endif; ?> | |
| 124 | 122 | |
| 125 | 123 | <script type="text/template" id="tmpl-elementor-panel-global"> |
| 126 | 124 | <div class="elementor-nerd-box"> |
| 127 | 125 | <img class="elementor-nerd-box-icon" src="<?php echo ELEMENTOR_ASSETS_URL . 'images/information.svg'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" loading="lazy" alt="<?php echo esc_attr__( 'Elementor', 'elementor' ); ?>" /> |