mirror of
https://github.com/proelements/proelements.git
synced 2026-05-14 21:15:02 +00:00
v4.0.4
This commit is contained in:
@@ -553,42 +553,78 @@ class Fonts_Manager {
|
||||
return $fonts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue fonts css
|
||||
*
|
||||
* @param $post_css
|
||||
*/
|
||||
public function enqueue_fonts( $post_css ) {
|
||||
$used_fonts = $post_css->get_fonts();
|
||||
$font_manager_fonts = $this->get_fonts();
|
||||
private function resolve_font_data( $font_family ) {
|
||||
if ( in_array( $font_family, $this->enqueued_fonts, true ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$font_types = $this->get_font_types();
|
||||
|
||||
if ( ! isset( $font_types[ $font_family ] ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$font_type_name = $font_types[ $font_family ];
|
||||
|
||||
if ( 'variable' === $font_type_name ) {
|
||||
$font_type_name = 'custom';
|
||||
}
|
||||
|
||||
$font_type = $this->get_font_type_object( $font_type_name );
|
||||
|
||||
if ( ! $font_type ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$font_manager_fonts = $this->get_fonts();
|
||||
$font_data = isset( $font_manager_fonts[ $font_family ] ) ? $font_manager_fonts[ $font_family ] : [];
|
||||
|
||||
return [
|
||||
'font_type' => $font_type,
|
||||
'font_data' => $font_data,
|
||||
];
|
||||
}
|
||||
|
||||
public function enqueue_fonts( $post_css ) {
|
||||
$used_fonts = $post_css->get_fonts();
|
||||
|
||||
foreach ( $used_fonts as $font_family ) {
|
||||
if ( ! isset( $font_types[ $font_family ] ) || in_array( $font_family, $this->enqueued_fonts ) ) {
|
||||
$resolved = $this->resolve_font_data( $font_family );
|
||||
|
||||
if ( ! $resolved ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$font_type_name = $font_types[ $font_family ];
|
||||
|
||||
if ( 'variable' === $font_type_name ) {
|
||||
$font_type_name = 'custom';
|
||||
}
|
||||
|
||||
$font_type = $this->get_font_type_object( $font_type_name );
|
||||
if ( ! $font_type ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$font_data = [];
|
||||
if ( isset( $font_manager_fonts[ $font_family ] ) ) {
|
||||
$font_data = $font_manager_fonts[ $font_family ];
|
||||
}
|
||||
$font_type->enqueue_font( $font_family, $font_data, $post_css );
|
||||
$resolved['font_type']->enqueue_font( $font_family, $resolved['font_data'], $post_css );
|
||||
|
||||
$this->enqueued_fonts[] = $font_family;
|
||||
}
|
||||
}
|
||||
|
||||
public function print_font_link( $font_family ) {
|
||||
$resolved = $this->resolve_font_data( $font_family );
|
||||
|
||||
if ( ! $resolved ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$font_face = isset( $resolved['font_data']['font_face'] ) ? $resolved['font_data']['font_face'] : '';
|
||||
|
||||
if ( empty( $font_face ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_add_inline_style( 'elementor-pro-custom-fonts', $font_face );
|
||||
|
||||
$this->enqueued_fonts[] = $font_family;
|
||||
}
|
||||
|
||||
public function register_custom_font_styles( $fonts_to_enqueue ) {
|
||||
foreach ( $fonts_to_enqueue as $font_family ) {
|
||||
$this->print_font_link( $font_family );
|
||||
}
|
||||
}
|
||||
|
||||
public function register_ajax_actions( Ajax $ajax ) {
|
||||
$ajax->register_ajax_action( 'pro_assets_manager_panel_action_data', [ $this, 'assets_manager_panel_action_data' ] );
|
||||
}
|
||||
@@ -638,7 +674,7 @@ class Fonts_Manager {
|
||||
return;
|
||||
}
|
||||
|
||||
$menu_title = _x( 'Custom Fonts', 'Elementor Font', 'elementor-pro' );
|
||||
$menu_title = _x( 'Custom Fonts', 'Font', 'elementor-pro' );
|
||||
|
||||
add_submenu_page(
|
||||
Settings::PAGE_ID,
|
||||
@@ -671,6 +707,14 @@ class Fonts_Manager {
|
||||
add_filter( 'elementor/finder/categories', [ $this, 'add_finder_item' ] );
|
||||
add_action( 'elementor/css-file/post/parse', [ $this, 'enqueue_fonts' ] );
|
||||
add_action( 'elementor/css-file/global/parse', [ $this, 'enqueue_fonts' ] );
|
||||
add_action( 'elementor/fonts/register_styles', [ $this, 'register_custom_font_styles' ] );
|
||||
add_action( 'elementor/fonts/print_font_links/custom', [ $this, 'print_font_link' ] );
|
||||
add_action( 'elementor/fonts/print_font_links/variable', [ $this, 'print_font_link' ] );
|
||||
|
||||
add_action( 'wp_enqueue_scripts', function () {
|
||||
wp_register_style( 'elementor-pro-custom-fonts', false, [], ELEMENTOR_PRO_VERSION );
|
||||
wp_enqueue_style( 'elementor-pro-custom-fonts' );
|
||||
}, 15 );
|
||||
add_filter( 'post_updated_messages', [ $this, 'post_updated_messages' ] );
|
||||
add_filter( 'enter_title_here', [ $this, 'update_enter_title_here' ], 10, 2 );
|
||||
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\AtomicForm;
|
||||
|
||||
use ElementorPro\Base\Module_Base;
|
||||
use ElementorPro\Plugin;
|
||||
use Elementor\Modules\AtomicWidgets\Module as AtomicWidgetsModule;
|
||||
use Elementor\Core\Experiments\Manager as ExperimentsManager;
|
||||
use ElementorPro\Modules\AtomicForm\Widgets\Input;
|
||||
use ElementorPro\Modules\AtomicForm\Widgets\Label;
|
||||
use ElementorPro\Modules\AtomicForm\Widgets\Textarea;
|
||||
use Elementor\Modules\AtomicWidgets\Module as AtomicWidgetsModule;
|
||||
use Elementor\Widgets_Manager;
|
||||
use ElementorPro\Base\Module_Base;
|
||||
use ElementorPro\License\API;
|
||||
use ElementorPro\Modules\AtomicForm\Actions\Action_Runner;
|
||||
use ElementorPro\Modules\AtomicForm\Classes\Akismet;
|
||||
use ElementorPro\Modules\AtomicForm\Input\Input;
|
||||
use ElementorPro\Modules\AtomicForm\Label\Label;
|
||||
use ElementorPro\Modules\AtomicForm\Textarea\Textarea;
|
||||
use ElementorPro\Modules\AtomicForm\Submit_Button\Submit_Button;
|
||||
use ElementorPro\Modules\AtomicForm\Checkbox\Checkbox;
|
||||
use ElementorPro\Plugin;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
@@ -17,6 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
class Module extends Module_Base {
|
||||
const MODULE_NAME = 'e-atomic-form';
|
||||
const EXPERIMENT_NAME = 'e_pro_atomic_form';
|
||||
const AKISMET_LICENSE_FEATURE_NAME = 'akismet';
|
||||
|
||||
public function get_name() {
|
||||
return self::MODULE_NAME;
|
||||
@@ -28,7 +34,7 @@ class Module extends Module_Base {
|
||||
'title' => esc_html__( 'Atomic Form', 'elementor-pro' ),
|
||||
'description' => esc_html__( 'Atomic form widgets. Note: This feature requires the "Atomic Widgets" experiment to be enabled.', 'elementor-pro' ),
|
||||
'hidden' => true,
|
||||
'default' => ExperimentsManager::STATE_INACTIVE,
|
||||
'default' => ExperimentsManager::STATE_ACTIVE,
|
||||
'release_status' => ExperimentsManager::RELEASE_STATUS_DEV,
|
||||
];
|
||||
}
|
||||
@@ -40,16 +46,28 @@ class Module extends Module_Base {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( class_exists( '\Akismet' ) && API::is_licence_has_feature( static::AKISMET_LICENSE_FEATURE_NAME, API::BC_VALIDATION_CALLBACK ) ) {
|
||||
$this->add_component( 'akismet', new Akismet() );
|
||||
}
|
||||
|
||||
add_filter(
|
||||
'elementor/widgets/register',
|
||||
fn( $widgets_manager ) => $this->register_widgets( $widgets_manager )
|
||||
);
|
||||
|
||||
add_action( 'elementor/frontend/after_enqueue_styles', fn () => $this->add_inline_styles() );
|
||||
|
||||
add_action( 'init', fn() => Action_Runner::init() );
|
||||
if ( Atomic_Form_Controller::is_form_submitted() ) {
|
||||
$this->add_component( 'atomic_ajax_handler', new Atomic_Form_Controller() );
|
||||
|
||||
do_action( 'elementor_pro/atomic_forms/form_submitted', $this );
|
||||
}
|
||||
}
|
||||
|
||||
private function is_experiment_active(): bool {
|
||||
return Plugin::elementor()->experiments->is_feature_active( self::EXPERIMENT_NAME )
|
||||
return version_compare( ELEMENTOR_VERSION, '4.0', '>=' )
|
||||
&& Plugin::elementor()->experiments->is_feature_active( self::EXPERIMENT_NAME )
|
||||
&& Plugin::elementor()->experiments->is_feature_active( AtomicWidgetsModule::EXPERIMENT_NAME );
|
||||
}
|
||||
|
||||
@@ -57,12 +75,16 @@ class Module extends Module_Base {
|
||||
$widgets_manager->register( new Input() );
|
||||
$widgets_manager->register( new Label() );
|
||||
$widgets_manager->register( new Textarea() );
|
||||
$widgets_manager->register( new Submit_Button() );
|
||||
$widgets_manager->register( new Checkbox() );
|
||||
}
|
||||
|
||||
private function add_inline_styles() {
|
||||
// Default html textarea is resizable, but Elementor Atomic textarea is not resizable by default
|
||||
$inline_css = '.e-form-textarea-base:not([data-resizable]) { resize: none; }';
|
||||
wp_add_inline_style( 'elementor-frontend', $inline_css );
|
||||
$inline_styles = [
|
||||
Textarea::get_inline_styles(),
|
||||
Submit_Button::get_inline_styles(),
|
||||
];
|
||||
wp_add_inline_style( 'elementor-frontend', implode( ' ', $inline_styles ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ use ElementorPro\Modules\AtomicWidgets\PropTypes\Display_Conditions\Display_Cond
|
||||
use ElementorPro\Modules\AtomicWidgets\PropTypes\Display_Conditions\Condition_Group_Prop_Type;
|
||||
use ElementorPro\Modules\AtomicWidgets\Transformers\Display_Conditions as Display_Conditions_Transformer;
|
||||
use ElementorPro\Modules\AtomicWidgets\Transformers\Condition_Group as Condition_Group_Transformer;
|
||||
use ElementorPro\License\API;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
@@ -38,6 +39,13 @@ class Module extends Module_Base {
|
||||
'elementor/atomic-widgets/settings/transformers/register',
|
||||
fn ( $transformers ) => $this->register_settings_transformers( $transformers ),
|
||||
);
|
||||
|
||||
add_filter(
|
||||
'elementor/atomic_widgets/editor_data/element_styles',
|
||||
fn( $styles_without_custom_css, $styles ) => $this->get_license_based_custom_css_value( $styles_without_custom_css, $styles ),
|
||||
10,
|
||||
2
|
||||
);
|
||||
}
|
||||
|
||||
private function inject_props_schema( $schema ) {
|
||||
@@ -68,4 +76,17 @@ class Module extends Module_Base {
|
||||
|
||||
return $transformers;
|
||||
}
|
||||
|
||||
private function get_license_based_custom_css_value( $styles_without_custom_css, $styles ) {
|
||||
if ( $this->has_custom_css_feature_in_license() ) {
|
||||
return $styles;
|
||||
}
|
||||
|
||||
return $styles_without_custom_css;
|
||||
}
|
||||
|
||||
private function has_custom_css_feature_in_license() {
|
||||
return API::is_license_active() && API::is_licence_has_feature( 'atomic-custom-css' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -20,9 +20,7 @@ class Pro_Attributes_Transformer extends Transformer_Base {
|
||||
return '';
|
||||
}
|
||||
|
||||
$escaped_value = esc_attr( $item['value'] );
|
||||
|
||||
return $item['key'] . '="' . $escaped_value . '"';
|
||||
return $item['key'] . '="' . $item['value'] . '"';
|
||||
}, $value ) );
|
||||
|
||||
return $result;
|
||||
|
||||
@@ -46,9 +46,8 @@ class Module extends Module_Base {
|
||||
'utm_content' => 'cloud-library',
|
||||
'source' => 'cloud-library',
|
||||
] ) ),
|
||||
'library_connect_title_copy' => esc_html__( 'Connect to your Elementor account', 'elementor-pro' ),
|
||||
'library_connect_sub_title_copy' => esc_html__( 'This includes purchasing and activating your Elementor Pro license on a specific site.', 'elementor-pro' ) . '<br>' . esc_html__( 'Then you can find all your templates in one convenient library.', 'elementor-pro' ),
|
||||
'library_connect_button_copy' => esc_html__( 'Connect & Activate', 'elementor-pro' ),
|
||||
] );
|
||||
'library_connect_title_copy' => esc_html__( 'Connect & Activate', 'elementor-pro' ),
|
||||
'library_connect_sub_title_copy' => esc_html__( 'Sub Title', 'elementor-pro' ),
|
||||
'library_connect_button_copy' => esc_html__( 'Connect & Activate', 'elementor-pro' ), ] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,17 +148,8 @@ class Module extends Module_Base {
|
||||
}
|
||||
|
||||
protected function add_render_actions() {
|
||||
$element_types = [
|
||||
'section',
|
||||
'column',
|
||||
'widget',
|
||||
'container',
|
||||
];
|
||||
|
||||
foreach ( $element_types as $el ) {
|
||||
add_action( 'elementor/frontend/' . $el . '/before_render', [ $this, 'before_element_render' ] );
|
||||
add_action( 'elementor/frontend/' . $el . '/after_render', [ $this, 'after_element_render' ] );
|
||||
}
|
||||
add_action( 'elementor/frontend/before_render', [ $this, 'before_element_render' ] );
|
||||
add_action( 'elementor/frontend/after_render', [ $this, 'after_element_render' ] );
|
||||
}
|
||||
|
||||
private function add_control_to_advanced_tab( $element, $args, $injection_position ) {
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\ACF\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\ACF\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class ACF_COLOR extends Data_Tag {
|
||||
class ACF_COLOR extends Base_ACF_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'acf-color';
|
||||
|
||||
@@ -3,14 +3,13 @@ namespace ElementorPro\Modules\DynamicTags\ACF\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\ACF\Dynamic_Value_Provider;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\ACF\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class ACF_Date_Time extends Data_Tag {
|
||||
class ACF_Date_Time extends Base_ACF_Tag {
|
||||
|
||||
/**
|
||||
* @var Dynamic_Value_Provider|mixed
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\ACF\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\ACF\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class ACF_Gallery extends Data_Tag {
|
||||
class ACF_Gallery extends Base_ACF_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'acf-gallery';
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\ACF\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\ACF\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class ACF_Image extends Data_Tag {
|
||||
class ACF_Image extends Base_ACF_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'acf-image';
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\ACF\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\ACF\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class ACF_Number extends Tag {
|
||||
class ACF_Number extends Base_ACF_Rendered_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'acf-number';
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\ACF\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\ACF\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class ACF_Text extends Tag {
|
||||
class ACF_Text extends Base_ACF_Rendered_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'acf-text';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\ACF\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\ACF\Module;
|
||||
use ElementorPro\Modules\DynamicTags\Module as DynamicTagsModule;
|
||||
|
||||
@@ -9,7 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class ACF_URL extends Data_Tag {
|
||||
class ACF_URL extends Base_ACF_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'acf-url';
|
||||
|
||||
@@ -30,6 +30,7 @@ class Module extends TagsModule {
|
||||
|
||||
const WOOCOMMERCE_GROUP = 'woocommerce';
|
||||
|
||||
const LICENSE_FEATURE_DYNAMIC_TAGS_NAME = 'dynamic-tags';
|
||||
const LICENSE_FEATURE_ACF_NAME = 'dynamic-tags-acf';
|
||||
const LICENSE_FEATURE_PODS_NAME = 'dynamic-tags-pods';
|
||||
const LICENSE_FEATURE_TOOLSET_NAME = 'dynamic-tags-toolset';
|
||||
@@ -91,46 +92,49 @@ class Module extends TagsModule {
|
||||
}
|
||||
|
||||
public function get_tag_classes_names() {
|
||||
$tags = [
|
||||
'Archive_Description',
|
||||
'Archive_Meta',
|
||||
'Archive_Title',
|
||||
'Archive_URL',
|
||||
'Author_Info',
|
||||
'Author_Meta',
|
||||
'Author_Name',
|
||||
'Author_Profile_Picture',
|
||||
'Author_URL',
|
||||
'Comments_Number',
|
||||
'Comments_URL',
|
||||
'Page_Title',
|
||||
'Post_Date',
|
||||
'Post_Excerpt',
|
||||
'Post_Featured_Image',
|
||||
'Post_Gallery',
|
||||
'Post_ID',
|
||||
'Post_Terms',
|
||||
'Post_Time',
|
||||
'Post_Title',
|
||||
'Post_URL',
|
||||
'Site_Logo',
|
||||
'Site_Tagline',
|
||||
'Site_Title',
|
||||
'Site_URL',
|
||||
'Internal_URL',
|
||||
'Current_Date_Time',
|
||||
'Reload_Page',
|
||||
'Request_Parameter',
|
||||
'Lightbox',
|
||||
'Featured_Image_Data',
|
||||
'Shortcode',
|
||||
'Contact_URL',
|
||||
'User_Info',
|
||||
'User_Profile_Picture',
|
||||
];
|
||||
$tier = API::get_access_tier();
|
||||
$tags = [];
|
||||
|
||||
if ( 'essential' !== $tier ) {
|
||||
if ( API::is_licence_has_feature( self::LICENSE_FEATURE_DYNAMIC_TAGS_NAME, API::BC_VALIDATION_CALLBACK ) ) {
|
||||
$tags = [
|
||||
'Archive_Description',
|
||||
'Archive_Meta',
|
||||
'Archive_Title',
|
||||
'Archive_URL',
|
||||
'Author_Info',
|
||||
'Author_Meta',
|
||||
'Author_Name',
|
||||
'Author_Profile_Picture',
|
||||
'Author_URL',
|
||||
'Comments_Number',
|
||||
'Comments_URL',
|
||||
'Page_Title',
|
||||
'Post_Date',
|
||||
'Post_Excerpt',
|
||||
'Post_Featured_Image',
|
||||
'Post_Gallery',
|
||||
'Post_ID',
|
||||
'Post_Terms',
|
||||
'Post_Time',
|
||||
'Post_Title',
|
||||
'Post_URL',
|
||||
'Site_Logo',
|
||||
'Site_Tagline',
|
||||
'Site_Title',
|
||||
'Site_URL',
|
||||
'Internal_URL',
|
||||
'Current_Date_Time',
|
||||
'Reload_Page',
|
||||
'Request_Parameter',
|
||||
'Lightbox',
|
||||
'Featured_Image_Data',
|
||||
'Shortcode',
|
||||
'Contact_URL',
|
||||
'User_Info',
|
||||
'User_Profile_Picture',
|
||||
];
|
||||
}
|
||||
|
||||
if ( API::is_licence_has_feature( self::LICENSE_FEATURE_ACF_NAME, API::BC_VALIDATION_CALLBACK ) ) {
|
||||
$tags[] = 'Post_Custom_Field';
|
||||
}
|
||||
|
||||
|
||||
@@ -3,13 +3,20 @@ namespace ElementorPro\Modules\DynamicTags\Pods\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\License_Meta_Trait;
|
||||
use ElementorPro\Modules\DynamicTags\Pods\Module;
|
||||
use ElementorPro\Modules\DynamicTags\Module as DynamicTagsModule;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
abstract class Pods_Base extends Tag {
|
||||
use License_Meta_Trait;
|
||||
|
||||
protected function get_required_license_feature() {
|
||||
return DynamicTagsModule::LICENSE_FEATURE_PODS_NAME;
|
||||
}
|
||||
|
||||
public function get_group() {
|
||||
return Module::PODS_GROUP;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
use ElementorPro\Modules\LoopBuilder\Providers\Taxonomy_Loop_Provider;
|
||||
|
||||
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Archive_Description extends Tag {
|
||||
class Archive_Description extends Pro_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'archive-description';
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Archive_Meta extends Tag {
|
||||
class Archive_Meta extends Pro_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'archive-meta';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Core\Utils;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
use ElementorPro\Modules\LoopBuilder\Providers\Taxonomy_Loop_Provider;
|
||||
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Archive_Title extends Tag {
|
||||
class Archive_Title extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'archive-title';
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Data_Tag;
|
||||
use ElementorPro\Core\Utils;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Archive_URL extends Data_Tag {
|
||||
class Archive_URL extends Pro_Data_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'archive-url';
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Author_Name extends Tag {
|
||||
class Author_Name extends Pro_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'author-name';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Data_Tag;
|
||||
use ElementorPro\Core\Utils;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Author_Profile_Picture extends Data_Tag {
|
||||
class Author_Profile_Picture extends Pro_Data_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'author-profile-picture';
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Author_URL extends Data_Tag {
|
||||
class Author_URL extends Pro_Data_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'author-url';
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags\Base;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
abstract class Author_Tag extends Tag {
|
||||
abstract class Author_Tag extends Pro_Tag {
|
||||
|
||||
public function get_categories() {
|
||||
return [ Module::TEXT_CATEGORY ];
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Comments_Number extends Tag {
|
||||
class Comments_Number extends Pro_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'comments-number';
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Comments_URL extends Data_Tag {
|
||||
class Comments_URL extends Pro_Data_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'comments-url';
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Contact_URL extends Tag {
|
||||
class Contact_URL extends Pro_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'contact-url';
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Current_Date_Time extends Tag {
|
||||
class Current_Date_Time extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'current-date-time';
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Featured_Image_Data extends Tag {
|
||||
class Featured_Image_Data extends Pro_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'featured-image-data';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
use ElementorPro\Modules\QueryControl\Module as QueryModule;
|
||||
|
||||
@@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Internal_URL extends Data_Tag {
|
||||
class Internal_URL extends Pro_Data_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'internal-url';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Embed;
|
||||
@@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
|
||||
|
||||
class Lightbox extends Tag {
|
||||
class Lightbox extends Pro_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'lightbox';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Core\Utils;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
use ElementorPro\Plugin;
|
||||
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Page_Title extends Tag {
|
||||
class Page_Title extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'page-title';
|
||||
}
|
||||
|
||||
@@ -120,4 +120,15 @@ class Post_Custom_Field extends Tag {
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
public function get_editor_config() {
|
||||
$config = parent::get_editor_config();
|
||||
|
||||
$config['meta'] = [
|
||||
'origin' => 'elementor',
|
||||
'required_license' => Module::LICENSE_FEATURE_ACF_NAME,
|
||||
];
|
||||
|
||||
return $config;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Post_Date extends Tag {
|
||||
class Post_Date extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'post-date';
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Core\Utils;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Post_Excerpt extends Tag {
|
||||
class Post_Excerpt extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'post-excerpt';
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Post_Featured_Image extends Data_Tag {
|
||||
class Post_Featured_Image extends Pro_Data_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'post-featured-image';
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Post_Gallery extends Data_Tag {
|
||||
class Post_Gallery extends Pro_Data_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'post-gallery';
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Post_ID extends Tag {
|
||||
class Post_ID extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'post-id';
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
use ElementorPro\Core\Utils;
|
||||
|
||||
@@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Post_Terms extends Tag {
|
||||
class Post_Terms extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'post-terms';
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Post_Time extends Tag {
|
||||
class Post_Time extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'post-time';
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Post_Title extends Tag {
|
||||
class Post_Title extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'post-title';
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
|
||||
|
||||
class Post_URL extends Data_Tag {
|
||||
class Post_URL extends Pro_Data_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'post-url';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Embed;
|
||||
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Reload_Page extends Tag {
|
||||
class Reload_Page extends Pro_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'reload-page';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
use ElementorPro\Core\Utils;
|
||||
|
||||
@@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Request_Parameter extends Tag {
|
||||
class Request_Parameter extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'request-arg';
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Shortcode extends Tag {
|
||||
class Shortcode extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'shortcode';
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Site_Logo extends Data_Tag {
|
||||
class Site_Logo extends Pro_Data_Tag {
|
||||
public function get_name() {
|
||||
return 'site-logo';
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Site_Tagline extends Tag {
|
||||
class Site_Tagline extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'site-tagline';
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Site_Title extends Tag {
|
||||
class Site_Title extends Pro_Tag {
|
||||
public function get_name() {
|
||||
return 'site-title';
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Site_URL extends Data_Tag {
|
||||
class Site_URL extends Pro_Data_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'site-url';
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
namespace ElementorPro\Modules\DynamicTags\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Pro_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class User_Info extends Tag {
|
||||
class User_Info extends Pro_Tag {
|
||||
|
||||
public function get_name() {
|
||||
return 'user-info';
|
||||
|
||||
@@ -3,13 +3,20 @@ namespace ElementorPro\Modules\DynamicTags\Toolset\Tags;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\License_Meta_Trait;
|
||||
use ElementorPro\Modules\DynamicTags\Toolset\Module;
|
||||
use ElementorPro\Modules\DynamicTags\Module as DynamicTagsModule;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
abstract class Toolset_Base extends Tag {
|
||||
use License_Meta_Trait;
|
||||
|
||||
protected function get_required_license_feature() {
|
||||
return DynamicTagsModule::LICENSE_FEATURE_TOOLSET_NAME;
|
||||
}
|
||||
|
||||
public function get_group() {
|
||||
return Module::TOOLSET_GROUP;
|
||||
|
||||
@@ -127,7 +127,7 @@ class Floating_Buttons extends Theme_Document {
|
||||
$actions['edit_with_elementor'] = sprintf(
|
||||
'<a href="%1$s">%2$s</a>',
|
||||
$edit_url,
|
||||
esc_html__( 'Edit with Elementor', 'elementor-pro' )
|
||||
esc_html__( 'Edit', 'elementor-pro' )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class Activity_Log extends Action_Base {
|
||||
public function on_export( $element ) {}
|
||||
|
||||
public function aal_init_roles( $roles ) {
|
||||
$roles['manage_options'][] = 'Elementor Forms';
|
||||
$roles['manage_options'][] = 'Forms';
|
||||
|
||||
return $roles;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ class Activity_Log extends Action_Base {
|
||||
aal_insert_log(
|
||||
[
|
||||
'action' => 'New Record',
|
||||
'object_type' => 'Elementor Forms',
|
||||
'object_type' => 'Forms',
|
||||
'object_id' => $record->get_form_settings( 'id' ),
|
||||
'object_name' => $record->get_form_settings( 'form_name' ),
|
||||
]
|
||||
|
||||
@@ -169,7 +169,7 @@ class Discord extends Action_Base {
|
||||
'title' => isset( $settings['discord_title'] ) ? $settings['discord_title'] : esc_html__( 'A new Submission', 'elementor-pro' ),
|
||||
'description' => isset( $settings['discord_content'] ) ? $settings['discord_content'] : esc_html__( 'A new Form Submission has been received', 'elementor-pro' ),
|
||||
'author' => [
|
||||
'name' => isset( $settings['discord_username'] ) ? $settings['discord_username'] : esc_html__( 'Elementor Forms', 'elementor-pro' ),
|
||||
'name' => isset( $settings['discord_username'] ) ? $settings['discord_username'] : esc_html__( 'Forms', 'elementor-pro' ),
|
||||
'url' => $page_url,
|
||||
'icon_url' => isset( $settings['discord_avatar_url'] ) ? $settings['discord_avatar_url'] : null,
|
||||
],
|
||||
|
||||
@@ -2,19 +2,15 @@
|
||||
namespace ElementorPro\Modules\Forms;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Core\Admin\Admin_Notices;
|
||||
use Elementor\Core\Common\Modules\Ajax\Module as Ajax;
|
||||
use Elementor\Modules\EditorOne\Classes\Menu_Data_Provider;
|
||||
use Elementor\Settings;
|
||||
use Elementor\User;
|
||||
use ElementorPro\Base\Editor_One_Trait;
|
||||
use ElementorPro\Base\Module_Base;
|
||||
use ElementorPro\Core\Upgrade\Manager as Upgrade_Manager;
|
||||
use ElementorPro\Core\Utils;
|
||||
use ElementorPro\License\API;
|
||||
use ElementorPro\Modules\Forms\Controls\Fields_Map;
|
||||
use ElementorPro\Modules\Forms\Controls\Fields_Repeater;
|
||||
use ElementorPro\Modules\Forms\Data\Controller;
|
||||
use ElementorPro\Modules\Forms\Registrars\Form_Actions_Registrar;
|
||||
use ElementorPro\Modules\Forms\Registrars\Form_Fields_Registrar;
|
||||
use ElementorPro\Modules\Forms\Submissions\AdminMenuItems\Submissions_Promotion_Menu_Item;
|
||||
@@ -22,6 +18,7 @@ use ElementorPro\Modules\Forms\Submissions\Component as Form_Submissions_Compone
|
||||
use ElementorPro\Modules\Forms\Submissions\EditorOneMenuItems\Editor_One_Submissions_Menu_Item;
|
||||
use ElementorPro\Modules\Forms\Submissions\EditorOneMenuItems\Editor_One_Submissions_Promotion;
|
||||
use ElementorPro\Plugin;
|
||||
use ElementorPro\Modules\AtomicForm\Atomic_Form_Controller;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
|
||||
@@ -16,7 +16,7 @@ class Personal_Data extends Base_Object {
|
||||
* @return string
|
||||
*/
|
||||
private function get_title() {
|
||||
return esc_html__( 'Elementor Submissions', 'elementor-pro' );
|
||||
return esc_html__( 'Submissions', 'elementor-pro' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,6 +59,52 @@ class Form extends Form_Base {
|
||||
return [ 'widget-form' ];
|
||||
}
|
||||
|
||||
private function should_show_atomic_form_promotion(): bool {
|
||||
if ( version_compare( ELEMENTOR_VERSION, '4.0', '<' ) ) {
|
||||
return false;
|
||||
}
|
||||
if ( ! Plugin::elementor()->experiments->is_feature_active( 'e_atomic_elements' ) ) {
|
||||
return false;
|
||||
}
|
||||
if ( ! Plugin::elementor()->experiments->is_feature_active( 'e_pro_atomic_form' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ! Hints::is_dismissed( 'atomic_form_v3_promotion' );
|
||||
}
|
||||
|
||||
private function render_atomic_form_promotion() {
|
||||
if ( ! $this->should_show_atomic_form_promotion() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->add_control(
|
||||
'atomic_form_v3_promotion',
|
||||
[
|
||||
'type' => Controls_Manager::NOTICE,
|
||||
'notice_type' => 'info',
|
||||
'icon' => true,
|
||||
'dismissible' => false,
|
||||
'heading' => esc_html__( 'Atomic form', 'elementor-pro' ),
|
||||
'content' => '<style>'
|
||||
. '.elementor-control-atomic_form_v3_promotion .elementor-control-notice { gap: 6px; padding: 11px 13px; margin-block-start: -10px; }'
|
||||
. '.elementor-control-atomic_form_v3_promotion .elementor-control-notice-main { padding-inline-end: 12px; }'
|
||||
. '.elementor-control-atomic_form_v3_promotion .elementor-control-notice-main-heading { font-weight: normal; font-size: 13px; }'
|
||||
. '.elementor-control-atomic_form_v3_promotion .e-btn { background: transparent; padding: 0; font-weight: 800; }'
|
||||
. '.elementor-control-atomic_form_v3_promotion .e-btn:hover { background: transparent; }'
|
||||
. '.elementor-control-atomic_form_v3_promotion .e-btn-1 { color: #69727D; }'
|
||||
. '.elementor-control-atomic_form_v3_promotion .e-btn-2 { color: #3F6AD8; }'
|
||||
. '</style>'
|
||||
. esc_html__( 'Switch to the Atomic form for full styling control and unlimited design flexibility.', 'elementor-pro' ),
|
||||
'button_text' => esc_html__( 'Dismiss', 'elementor-pro' ),
|
||||
'button_event' => 'atomic_form_v3_promotion',
|
||||
'button_text2' => esc_html__( 'Use Atomic Form', 'elementor-pro' ),
|
||||
'button_event2' => 'atomic_form_v3_promotion',
|
||||
'separator' => 'after',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
$repeater = new Repeater();
|
||||
|
||||
@@ -501,6 +547,8 @@ class Form extends Form_Base {
|
||||
]
|
||||
);
|
||||
|
||||
$this->render_atomic_form_promotion();
|
||||
|
||||
$this->add_control(
|
||||
'form_name',
|
||||
[
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
namespace ElementorPro\Modules\Interactions;
|
||||
|
||||
use ElementorPro\Plugin;
|
||||
use ElementorPro\Core\Utils as ProUtils;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Modules\Interactions\Module as InteractionsModule;
|
||||
use Elementor\Modules\Interactions\Presets;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
@@ -38,10 +41,13 @@ class Hooks {
|
||||
}
|
||||
|
||||
private function replace_core_handlers() {
|
||||
add_action( 'elementor/frontend/before_enqueue_scripts', [ $this, 'replace_frontend_handlers' ], 20 );
|
||||
// Run after core's print_interactions_data (priority 1). If core enqueued its script
|
||||
// it means the page has interactions — swap it for the pro script. If core didn't
|
||||
// enqueue anything (no interactions), we skip too, preserving the load optimization.
|
||||
add_action( 'wp_footer', [ $this, 'replace_frontend_handlers' ], 2 );
|
||||
|
||||
add_action( 'elementor/preview/enqueue_scripts', function() {
|
||||
$core_module = Plugin::elementor()->modules_manager->get_modules( 'e-interactions' );
|
||||
$core_module = Plugin::elementor()->modules_manager->get_modules( ProUtils::get_class_constant( InteractionsModule::class, 'MODULE_NAME', 'e-interactions' ) );
|
||||
if ( $core_module && method_exists( $core_module, 'enqueue_preview_scripts' ) ) {
|
||||
remove_action( 'elementor/preview/enqueue_scripts', [ $core_module, 'enqueue_preview_scripts' ] );
|
||||
}
|
||||
@@ -53,73 +59,77 @@ class Hooks {
|
||||
}
|
||||
|
||||
public function register_frontend_scripts() {
|
||||
$suffix = ( Utils::is_script_debug() || Utils::is_elementor_tests() ) ? '' : '.min';
|
||||
|
||||
wp_register_script(
|
||||
'elementor-interactions-pro',
|
||||
$this->get_js_assets_url( 'interactions-pro' ),
|
||||
[ 'motion-js' ],
|
||||
[
|
||||
ProUtils::get_class_constant( InteractionsModule::class, 'HANDLE_MOTION_JS', 'motion-js' ),
|
||||
ProUtils::get_class_constant( InteractionsModule::class, 'HANDLE_SHARED_UTILS', 'elementor-interactions-shared-utils' ),
|
||||
],
|
||||
ELEMENTOR_PRO_VERSION,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
public function register_editor_scripts() {
|
||||
$suffix = ( Utils::is_script_debug() || Utils::is_elementor_tests() ) ? '' : '.min';
|
||||
|
||||
wp_register_script(
|
||||
'elementor-editor-interactions-pro',
|
||||
$this->get_js_assets_url( 'editor-interactions-pro' ),
|
||||
[ 'motion-js' ],
|
||||
[
|
||||
ProUtils::get_class_constant( InteractionsModule::class, 'HANDLE_MOTION_JS', 'motion-js' ),
|
||||
ProUtils::get_class_constant( InteractionsModule::class, 'HANDLE_SHARED_UTILS', 'elementor-interactions-shared-utils' ),
|
||||
],
|
||||
ELEMENTOR_PRO_VERSION,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
public function replace_frontend_handlers() {
|
||||
wp_dequeue_script( 'elementor-interactions' );
|
||||
wp_deregister_script( 'elementor-interactions' );
|
||||
$handle_frontend = ProUtils::get_class_constant( InteractionsModule::class, 'HANDLE_FRONTEND', 'elementor-interactions' );
|
||||
|
||||
// Core only enqueues its script when the page has interactions.
|
||||
// If it didn't enqueue, there's nothing to replace — skip to preserve the load optimization.
|
||||
if ( ! wp_script_is( $handle_frontend, 'enqueued' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_dequeue_script( $handle_frontend );
|
||||
wp_deregister_script( $handle_frontend );
|
||||
|
||||
wp_enqueue_script( 'elementor-interactions-pro' );
|
||||
|
||||
$config = $this->get_config();
|
||||
wp_localize_script(
|
||||
'elementor-interactions-pro',
|
||||
'ElementorInteractionsConfig',
|
||||
$config
|
||||
ProUtils::get_class_constant( InteractionsModule::class, 'JS_CONFIG_OBJECT', 'ElementorInteractionsConfig' ),
|
||||
$this->get_config()
|
||||
);
|
||||
}
|
||||
|
||||
public function replace_preview_handlers() {
|
||||
wp_dequeue_script( 'elementor-editor-interactions' );
|
||||
wp_deregister_script( 'elementor-editor-interactions' );
|
||||
$handle_editor = ProUtils::get_class_constant( InteractionsModule::class, 'HANDLE_EDITOR', 'elementor-editor-interactions' );
|
||||
wp_dequeue_script( $handle_editor );
|
||||
wp_deregister_script( $handle_editor );
|
||||
|
||||
wp_enqueue_script( 'elementor-editor-interactions-pro' );
|
||||
|
||||
$config = $this->get_config();
|
||||
wp_localize_script(
|
||||
'elementor-editor-interactions-pro',
|
||||
'ElementorInteractionsConfig',
|
||||
$config
|
||||
ProUtils::get_class_constant( InteractionsModule::class, 'JS_CONFIG_OBJECT', 'ElementorInteractionsConfig' ),
|
||||
$this->get_config()
|
||||
);
|
||||
}
|
||||
|
||||
private function get_config() {
|
||||
$interactions_module = Plugin::elementor()->modules_manager->get_modules( 'e-interactions' );
|
||||
|
||||
if ( $interactions_module && method_exists( $interactions_module, 'get_config' ) ) {
|
||||
return $interactions_module->get_config();
|
||||
if ( class_exists( 'Elementor\\Modules\\Interactions\\Module' ) ) {
|
||||
$module = \Elementor\Modules\Interactions\Module::instance();
|
||||
if ( $module && is_callable( [ $module, 'get_config' ] ) ) {
|
||||
return $module->get_config();
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'constants' => [
|
||||
'defaultDuration' => 300,
|
||||
'defaultDelay' => 0,
|
||||
'slideDistance' => 100,
|
||||
'scaleStart' => 0,
|
||||
'easing' => 'linear',
|
||||
],
|
||||
'animationOptions' => [],
|
||||
'constants' => class_exists( Presets::class ) ? ( new Presets() )->defaults() : [],
|
||||
'breakpoints' => [],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -4,20 +4,22 @@ namespace ElementorPro\Modules\Interactions;
|
||||
|
||||
use ElementorPro\Plugin;
|
||||
use ElementorPro\Base\Module_Base;
|
||||
use ElementorPro\Core\Utils as ProUtils;
|
||||
use Elementor\Modules\AtomicWidgets\Module as AtomicWidgetsModule;
|
||||
use Elementor\Modules\Interactions\Module as InteractionsModule;
|
||||
use Elementor\Core\Experiments\Manager as ExperimentsManager;
|
||||
use ElementorPro\License\API;
|
||||
use ElementorPro\License\Admin;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Module extends Module_Base {
|
||||
const MODULE_NAME = 'e-interactions';
|
||||
const EXPERIMENT_NAME = 'e_pro_interactions';
|
||||
|
||||
public function get_name() {
|
||||
return self::MODULE_NAME;
|
||||
return ProUtils::get_class_constant( InteractionsModule::class, 'MODULE_NAME', 'e-interactions' );
|
||||
}
|
||||
|
||||
public static function get_experimental_data(): array {
|
||||
@@ -26,11 +28,23 @@ class Module extends Module_Base {
|
||||
'title' => esc_html__( 'Pro Interactions', 'elementor-pro' ),
|
||||
'description' => esc_html__( 'Enhanced interactions with replay support. Note: This feature requires both the "Atomic Widgets" and "Interactions" experiments to be enabled.', 'elementor-pro' ),
|
||||
'hidden' => true,
|
||||
'default' => ExperimentsManager::STATE_INACTIVE,
|
||||
'default' => ExperimentsManager::STATE_ACTIVE,
|
||||
'release_status' => ExperimentsManager::RELEASE_STATUS_DEV,
|
||||
];
|
||||
}
|
||||
|
||||
private function is_supported_by_current_license() {
|
||||
if ( empty( \ElementorPro\License\Admin::get_license_key() ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! API::is_license_active() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return API::is_licence_has_feature( 'pro-interactions', API::BC_VALIDATION_CALLBACK );
|
||||
}
|
||||
|
||||
private function hooks() {
|
||||
return new Hooks();
|
||||
}
|
||||
@@ -38,7 +52,7 @@ class Module extends Module_Base {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
|
||||
if ( ! $this->is_experiment_active() ) {
|
||||
if ( ! $this->is_experiment_active() || ! $this->is_supported_by_current_license() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -46,9 +60,10 @@ class Module extends Module_Base {
|
||||
}
|
||||
|
||||
private function is_experiment_active(): bool {
|
||||
return class_exists( 'Elementor\\Modules\\Interactions\\Module' )
|
||||
return version_compare( ELEMENTOR_VERSION, '4.0', '>=' )
|
||||
&& class_exists( 'Elementor\\Modules\\Interactions\\Module' )
|
||||
&& Plugin::elementor()->experiments->is_feature_active( self::EXPERIMENT_NAME )
|
||||
&& Plugin::elementor()->experiments->is_feature_active( AtomicWidgetsModule::EXPERIMENT_NAME )
|
||||
&& Plugin::elementor()->experiments->is_feature_active( InteractionsModule::EXPERIMENT_NAME );
|
||||
&& Plugin::elementor()->experiments->is_feature_active( ProUtils::get_class_constant( InteractionsModule::class, 'EXPERIMENT_NAME', 'e_interactions' ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class Shortcode {
|
||||
),
|
||||
sprintf(
|
||||
/* translators: %s: Template ID. */
|
||||
esc_html__( 'Elementor template shortcode for template %s', 'elementor-pro' ),
|
||||
esc_html__( 'Template shortcode for template %s', 'elementor-pro' ),
|
||||
$post_id // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
),
|
||||
sprintf(
|
||||
|
||||
@@ -142,7 +142,6 @@ class Module extends Module_Base {
|
||||
return '<div id="elementor-widget-template-empty-templates">
|
||||
<div class="elementor-widget-template-empty-templates-icon"><i class="eicon-nerd" aria-hidden="true"></i></div>
|
||||
<div class="elementor-widget-template-empty-templates-title">' . esc_html__( 'You Haven’t Saved Templates Yet.', 'elementor-pro' ) . '</div>
|
||||
<div class="elementor-widget-template-empty-templates-footer">' . esc_html__( 'Want to learn more about Elementor library?', 'elementor-pro' ) . ' <a class="elementor-widget-template-empty-templates-footer-url" href="https://go.elementor.com/docs-library/" target="_blank">' . esc_html__( 'Click Here', 'elementor-pro' ) . '</a>
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class Elementor_Library extends \WP_Widget {
|
||||
public function __construct() {
|
||||
parent::__construct(
|
||||
'elementor-library',
|
||||
esc_html__( 'Elementor Library', 'elementor-pro' ),
|
||||
esc_html__( 'Library', 'elementor-pro' ),
|
||||
[
|
||||
'description' => esc_html__( 'Embed your saved elements.', 'elementor-pro' ),
|
||||
]
|
||||
|
||||
@@ -38,7 +38,7 @@ class Personal_Data {
|
||||
* @return string
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Elementor Notes', 'elementor-pro' );
|
||||
return esc_html__( 'Notes', 'elementor-pro' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -145,7 +145,7 @@ class Share_Buttons extends Base_Widget {
|
||||
'button' => 'facebook',
|
||||
],
|
||||
[
|
||||
'button' => 'twitter',
|
||||
'button' => 'x-twitter',
|
||||
],
|
||||
[
|
||||
'button' => 'linkedin',
|
||||
|
||||
@@ -179,7 +179,7 @@ abstract class Single_Base extends Archive_Single_Base {
|
||||
/* translators: %s: Widget name. */
|
||||
'headerMessage' => sprintf( esc_html__( 'The %s widget was not found in your template.', 'elementor-pro' ), $depended_widget_title ),
|
||||
/* translators: 1: Widget name, 2: Template name. */
|
||||
'message' => sprintf( esc_html__( 'You must include the %1$s widget in your template (%2$s), in order for Elementor to work on this page.', 'elementor-pro' ), $depended_widget_title, '<strong>' . static::get_title() . '</strong>' ),
|
||||
'message' => sprintf( esc_html__( 'You must include the %1$s widget in your template (%2$s)', 'elementor-pro' ), $depended_widget_title, '<strong>' . static::get_title() . '</strong>' ),
|
||||
'strings' => [
|
||||
'confirm' => esc_html__( 'Edit Template', 'elementor-pro' ),
|
||||
],
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace ElementorPro\Modules\Variables;
|
||||
|
||||
use Elementor\Modules\Variables\PropTypes\Size_Variable_Prop_Type;
|
||||
use ElementorPro\Plugin;
|
||||
use ElementorPro\Base\Module_Base;
|
||||
use Elementor\Modules\AtomicWidgets\Module as AtomicWidgetsModule;
|
||||
@@ -48,6 +49,8 @@ class Module extends Module_Base {
|
||||
}
|
||||
|
||||
$this->hooks()->register();
|
||||
|
||||
add_action( 'elementor/editor/before_enqueue_scripts', fn () => $this->enqueue_editor_scripts() );
|
||||
}
|
||||
|
||||
private function is_experiment_active(): bool {
|
||||
@@ -56,4 +59,24 @@ class Module extends Module_Base {
|
||||
&& Plugin::elementor()->experiments->is_feature_active( AtomicWidgetsModule::EXPERIMENT_NAME )
|
||||
&& Plugin::elementor()->experiments->is_feature_active( VariablesModule::EXPERIMENT_NAME );
|
||||
}
|
||||
|
||||
private function get_quota_config( $limit ): array {
|
||||
return [
|
||||
Size_Variable_Prop_Type::get_key() => $limit,
|
||||
];
|
||||
}
|
||||
|
||||
public function enqueue_editor_scripts() {
|
||||
$limit = 100000;
|
||||
|
||||
if ( API::is_license_expired() ) {
|
||||
$limit = 0;
|
||||
}
|
||||
|
||||
wp_add_inline_script(
|
||||
'elementor-common',
|
||||
'window.ElementorVariablesQuotaConfigExtended = ' . wp_json_encode( $this->get_quota_config( $limit ) ) . ';',
|
||||
'before'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
namespace ElementorPro\Modules\Woocommerce\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Data_Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\License_Meta_Trait;
|
||||
use ElementorPro\Modules\Woocommerce\Module;
|
||||
use ElementorPro\Modules\Woocommerce\Tags\Traits\Tag_Product_Id;
|
||||
use ElementorPro\Modules\Woocommerce\Traits\Product_Id_Trait;
|
||||
@@ -14,16 +15,19 @@ abstract class Base_Data_Tag extends Data_Tag {
|
||||
|
||||
use Tag_Product_Id;
|
||||
use Product_Id_Trait;
|
||||
use License_Meta_Trait;
|
||||
|
||||
public function get_group() {
|
||||
return Module::WOOCOMMERCE_GROUP;
|
||||
}
|
||||
|
||||
protected function get_required_license_feature() {
|
||||
return Module::DYNAMIC_TAGS_LICENSE_FEATURE_NAME;
|
||||
}
|
||||
|
||||
public function get_editor_config() {
|
||||
$conf = parent::get_editor_config();
|
||||
|
||||
$conf['force_convert_to_atomic'] = true;
|
||||
|
||||
return $conf;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
namespace ElementorPro\Modules\Woocommerce\Tags;
|
||||
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag;
|
||||
use ElementorPro\Modules\DynamicTags\Tags\Base\License_Meta_Trait;
|
||||
use ElementorPro\Modules\Woocommerce\Module;
|
||||
use ElementorPro\Modules\Woocommerce\Tags\Traits\Tag_Product_Id;
|
||||
use ElementorPro\Modules\Woocommerce\Traits\Product_Id_Trait;
|
||||
@@ -14,6 +15,7 @@ abstract class Base_Tag extends Tag {
|
||||
|
||||
use Tag_Product_Id;
|
||||
use Product_Id_Trait;
|
||||
use License_Meta_Trait;
|
||||
|
||||
public function get_group() {
|
||||
return Module::WOOCOMMERCE_GROUP;
|
||||
@@ -23,11 +25,13 @@ abstract class Base_Tag extends Tag {
|
||||
return [ \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY ];
|
||||
}
|
||||
|
||||
protected function get_required_license_feature() {
|
||||
return Module::DYNAMIC_TAGS_LICENSE_FEATURE_NAME;
|
||||
}
|
||||
|
||||
public function get_editor_config() {
|
||||
$conf = parent::get_editor_config();
|
||||
|
||||
$conf['force_convert_to_atomic'] = true;
|
||||
|
||||
return $conf;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user