| 1 |
<?php |
| 2 |
namespace Elementor; |
| 3 |
|
| 4 |
use Elementor\Core\Utils\Hints; |
| 5 |
use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager; |
| 6 |
use Elementor\Utils; |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; // Exit if accessed directly. |
| 10 |
} |
| 11 |
?> |
| 12 |
<script type="text/template" id="tmpl-elementor-panel-elements"> |
| 13 |
<# if ( $e.components.get( 'document/elements' ).utils.allowAddingWidgets()) { #> |
| 14 |
<div id="elementor-panel-elements-navigation" class="elementor-panel-navigation"> |
| 15 |
<button class="elementor-component-tab elementor-panel-navigation-tab" data-tab="categories"><?php echo esc_html__( 'Elements', 'elementor' ); ?></button> |
| 16 |
<button class="elementor-component-tab elementor-panel-navigation-tab" data-tab="global"><?php echo esc_html__( 'Globals', 'elementor' ); ?></button> |
| 17 |
</div> |
| 18 |
<# } #> |
| 19 |
<div id="elementor-panel-elements-search-area"></div> |
| 20 |
<div id="elementor-panel-elements-notice-area"></div> |
| 21 |
<div id="elementor-panel-elements-wrapper"></div> |
| 22 |
<div id="elementor-panel-elements-widget-creation-area"></div> |
| 23 |
</script> |
| 24 |
|
| 25 |
<script type="text/template" id="tmpl-elementor-panel-categories"> |
| 26 |
<div id="elementor-panel-categories"></div> |
| 27 |
<?php |
| 28 |
$has_pro = Utils::has_pro(); |
| 29 |
$get_pro_details = apply_filters( 'elementor/editor/panel/get_pro_details', [ |
| 30 |
'link' => 'https://go.elementor.com/pro-widgets/', |
| 31 |
'message' => __( 'Get more with Elementor Pro', 'elementor' ), |
| 32 |
'button_text' => __( 'Upgrade Now', 'elementor' ), |
| 33 |
'show_banner' => ! $has_pro, |
| 34 |
] ); |
| 35 |
$promotion_data_sticky = [ |
| 36 |
'url' => 'https://go.elementor.com/go-pro-sticky-widget-panel/', |
| 37 |
'message' => __( 'Access all Pro widgets.', 'elementor' ), |
| 38 |
'button_text' => __( 'Upgrade Now', 'elementor' ), |
| 39 |
]; |
| 40 |
$promotion_data_sticky = Filtered_Promotions_Manager::get_filtered_promotion_data( $promotion_data_sticky, 'elementor/editor/panel/get_pro_details-sticky', 'url' ); |
| 41 |
?> |
| 42 |
<?php if ( $get_pro_details['show_banner'] ) : ?> |
| 43 |
<div id="elementor-panel-get-pro-elements" class="elementor-nerd-box"> |
| 44 |
<img class="elementor-nerd-box-icon" src="<?php echo ELEMENTOR_ASSETS_URL . 'images/go-pro.svg'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" loading="lazy" alt="<?php echo esc_attr__( 'Upgrade', 'elementor' ); ?>" /> |
| 45 |
<div class="elementor-nerd-box-message"><?php echo esc_html( $get_pro_details['message'] ); ?></div> |
| 46 |
<a class="elementor-button go-pro" target="_blank" href="<?php echo esc_url( $get_pro_details['link'] ); ?>"><?php echo esc_html( $get_pro_details['button_text'] ); ?></a> |
| 47 |
</div> |
| 48 |
<?php endif; ?> |
| 49 |
<?php if ( ! $has_pro ) : ?> |
| 50 |
<div id="elementor-panel-get-pro-elements-sticky"> |
| 51 |
<img class="elementor-nerd-box-icon" src="<?php echo ELEMENTOR_ASSETS_URL . 'images/unlock-sticky.svg'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" loading="lazy" alt="<?php echo esc_attr__( 'Upgrade', 'elementor' ); ?>"/> |
| 52 |
<div class="elementor-get-pro-sticky-message"> |
| 53 |
<?php echo esc_html( $promotion_data_sticky['message'] ); ?> |
| 54 |
<a target="_blank" href="<?php echo esc_url( $promotion_data_sticky['url'] ); ?>"><?php echo esc_html( $promotion_data_sticky['button_text'] ); ?></a> |
| 55 |
</div> |
| 56 |
</div> |
| 57 |
<?php endif; ?> |
| 58 |
</script> |
| 59 |
|
| 60 |
<script type="text/template" id="tmpl-elementor-panel-elements-category"> |
| 61 |
<button class="elementor-panel-heading elementor-panel-category-title"> |
| 62 |
<span class="elementor-panel-heading-toggle"> |
| 63 |
<i class="eicon-caret-right" aria-hidden="true"></i> |
| 64 |
</span> |
| 65 |
<span class="elementor-panel-heading-title">{{{ title }}}</span> |
| 66 |
<?php do_action( 'elementor/editor/templates/panel/category' ); ?> |
| 67 |
<# if ( 'undefined' !== typeof promotion && promotion ) { #> |
| 68 |
<span class="elementor-panel-heading-promotion"> |
| 69 |
<a href="{{{ promotion.url }}}" target="_blank"> |
| 70 |
<i class="eicon-upgrade-crown"></i><?php echo esc_html__( 'Upgrade', 'elementor' ); ?> |
| 71 |
</a> |
| 72 |
</span> |
| 73 |
<# } #> |
| 74 |
</button> |
| 75 |
<div class="elementor-panel-category-items elementor-responsive-panel"> |
| 76 |
<?php do_action( 'elementor/editor/templates/panel/category/content' ); ?> |
| 77 |
</div> |
| 78 |
</script> |
| 79 |
|
| 80 |
<script type="text/template" id="tmpl-elementor-panel-element-search"> |
| 81 |
<label for="elementor-panel-elements-search-input" class="screen-reader-text"><?php echo esc_html__( 'Search Widget:', 'elementor' ); ?></label> |
| 82 |
<input type="search" id="elementor-panel-elements-search-input" placeholder="<?php esc_attr_e( 'Search Widget...', 'elementor' ); ?>" autocomplete="off"/> |
| 83 |
<i class="eicon-search-bold" aria-hidden="true"></i> |
| 84 |
</script> |
| 85 |
|
| 86 |
<script type="text/template" id="tmpl-elementor-element-library-element"> |
| 87 |
<# const v4Categories = ['v4-elements', 'atomic-form']; #> |
| 88 |
<button class="elementor-element" data-library-element-type="{{ elType === 'widget' ? widgetType : elType }}"> |
| 89 |
<# if ( obj.integration ) { #> |
| 90 |
<i class="eicon-plug"></i> |
| 91 |
<# } else if ( false === obj.editable && !obj.atomicFormPromotion && !obj.birthdayEasterEgg ) { #> |
| 92 |
<i class="eicon-lock"></i> |
| 93 |
<# } #> |
| 94 |
<# if ( !obj.birthdayEasterEgg && obj.categories.some( category => v4Categories.includes( category ) ) ) { #> |
| 95 |
<i class="eicon-atomic"></i> |
| 96 |
<# } #> |
| 97 |
<div class="icon"> |
| 98 |
<i class="{{ icon }}" aria-hidden="true"></i> |
| 99 |
</div> |
| 100 |
<div class="title-wrapper"> |
| 101 |
<div class="title">{{{ title }}}</div> |
| 102 |
</div> |
| 103 |
</button> |
| 104 |
</script> |
| 105 |
|
| 106 |
<?php if ( Plugin::$instance->experiments->is_feature_active( Modules\WidgetCreation\Module::EXPERIMENT_NAME ) ) : ?> |
| 107 |
<?php |
| 108 |
$widget_creation_cta_text = Hints::is_plugin_active( 'angie' ) |
| 109 |
? __( 'Create custom widget', 'elementor' ) |
| 110 |
: __( 'Try for free', 'elementor' ); |
| 111 |
?> |
| 112 |
<script type="text/template" id="tmpl-elementor-panel-elements-widget-creation-empty-state"> |
| 113 |
<div class="elementor-panel-elements-widget-creation__title"><?php echo esc_html__( 'No widget found for', 'elementor' ); ?> "{{{ searchTerm }}}"</div> |
| 114 |
<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> |
| 115 |
<?php if ( current_user_can( 'manage_options' ) ) : ?> |
| 116 |
<button type="button" class="elementor-panel-elements-widget-creation__cta"><?php echo esc_html( $widget_creation_cta_text ); ?></button> |
| 117 |
<?php endif; ?> |
| 118 |
</script> |
| 119 |
|
| 120 |
<script type="text/template" id="tmpl-elementor-panel-elements-widget-creation-search-footer"> |
| 121 |
<div class="elementor-panel-elements-widget-creation__title"><?php echo esc_html__( "Couldn't find what you're looking for?", 'elementor' ); ?></div> |
| 122 |
<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> |
| 123 |
<?php if ( current_user_can( 'manage_options' ) ) : ?> |
| 124 |
<button type="button" class="elementor-panel-elements-widget-creation__cta"><?php echo esc_html( $widget_creation_cta_text ); ?></button> |
| 125 |
<?php endif; ?> |
| 126 |
</script> |
| 127 |
<?php endif; ?> |
| 128 |
|
| 129 |
<script type="text/template" id="tmpl-elementor-panel-global"> |
| 130 |
<div class="elementor-nerd-box"> |
| 131 |
<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' ); ?>" /> |
| 132 |
<div class="elementor-nerd-box-title"><?php echo esc_html__( 'Meet Our Global Widget', 'elementor' ); ?></div> |
| 133 |
<div class="elementor-nerd-box-message"><?php echo esc_html__( 'With this feature, you can save a widget as global, then add it to multiple areas. All areas will be editable from one single place.', 'elementor' ); ?></div> |
| 134 |
<a class="elementor-button go-pro" target="_blank" href="https://go.elementor.com/pro-global/"><?php echo esc_html__( 'Upgrade Now', 'elementor' ); ?></a> |
| 135 |
</div> |
| 136 |
</script> |
| 137 |
|