From 8801daa2802a1705875b552d08c57e867abf45cd Mon Sep 17 00:00:00 2001 From: TzviRabinovitch <99259629+TzviRabinovitch@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:59:06 +0300 Subject: [PATCH 1/6] Internal: [Rating] [Style] Added Spacing control [ED-11944] (#23675) --- includes/widgets/rating.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/includes/widgets/rating.php b/includes/widgets/rating.php index fd9b059160cb..c4b810baf2f0 100644 --- a/includes/widgets/rating.php +++ b/includes/widgets/rating.php @@ -66,6 +66,30 @@ private function add_style_tab() { ] ); + $this->add_responsive_control( + 'icon_gap', + [ + 'label' => esc_html__( 'Spacing', 'elementor' ), + 'type' => Controls_Manager::SLIDER, + 'range' => [ + 'em' => [ + 'min' => 0, + 'max' => 10, + 'step' => 0.1, + ], + 'rem' => [ + 'min' => 0, + 'max' => 10, + 'step' => 0.1, + ], + ], + 'size_units' => [ 'px', 'em', 'rem', 'vw', 'custom' ], + 'selectors' => [ + '{{WRAPPER}}' => '--e-rating-gap: {{SIZE}}{{UNIT}}', + ], + ] + ); + $this->end_controls_section(); } @@ -189,7 +213,7 @@ protected function get_star_marked_width( $star_index ): string { if ( $rating_value >= $star_index ) { $width = '100%'; - } else if ( intval( ceil( $rating_value ) ) === $star_index ) { + } elseif ( intval( ceil( $rating_value ) ) === $star_index ) { $width = ( $rating_value - ( $star_index - 1 ) ) * 100 . '%'; } From b091878e24d8c691be353d3afc5cd064aa4f4c51 Mon Sep 17 00:00:00 2001 From: Rami Yushuvaev <92088692+rami-elementor@users.noreply.github.com> Date: Wed, 6 Sep 2023 04:06:49 -0700 Subject: [PATCH 2/6] Tweak: Merge identical translation strings (i18n) [ED-11886] (#23661) Co-authored-by: Ariel Klikstein --- app/modules/onboarding/module.php | 10 +- .../components/settings/base/manager.js | 2 +- .../components/template-library/manager.js | 2 +- core/admin/admin-notices.php | 3 +- includes/controls/groups/background.php | 124 +++++++++--------- includes/controls/groups/border.php | 16 +-- includes/controls/groups/box-shadow.php | 6 +- includes/controls/groups/css-filter.php | 2 +- includes/controls/groups/flex-container.php | 44 +++---- includes/controls/groups/flex-item.php | 36 ++--- includes/controls/groups/grid-container.php | 24 ++-- includes/controls/groups/image-size.php | 8 +- includes/controls/groups/text-shadow.php | 4 +- includes/controls/groups/text-stroke.php | 2 +- includes/controls/groups/typography.php | 10 +- includes/controls/repeater.php | 2 +- includes/editor-templates/responsive-bar.php | 17 ++- includes/elements/column.php | 4 +- includes/settings/tools.php | 2 +- includes/widgets/divider.php | 44 +++---- includes/widgets/video.php | 2 +- .../assets/js/editor/commands/apply.js | 2 +- .../history/assets/js/revisions/panel/tab.js | 2 +- .../widgets/nested-accordion.php | 2 +- modules/nested-tabs/widgets/nested-tabs.php | 6 +- modules/page-templates/module.php | 6 +- .../form-submissions-promotion-item.php | 7 +- modules/safe-mode/module.php | 4 +- modules/system-info/reporters/server.php | 9 +- modules/system-info/reporters/theme.php | 2 +- 30 files changed, 200 insertions(+), 204 deletions(-) diff --git a/app/modules/onboarding/module.php b/app/modules/onboarding/module.php index 5adc7bbb2b7c..a73df1deb9e8 100644 --- a/app/modules/onboarding/module.php +++ b/app/modules/onboarding/module.php @@ -129,7 +129,7 @@ private function get_permission_error_response() { return [ 'status' => 'error', 'payload' => [ - 'error_message' => esc_html__( 'you are not allowed to perform this action', 'elementor' ), + 'error_message' => esc_html__( 'You do not have permissions to perform this action.', 'elementor' ), ], ]; } @@ -147,7 +147,7 @@ private function maybe_update_site_name() { $problem_error = [ 'status' => 'error', 'payload' => [ - 'error_message' => esc_html__( 'There was a problem setting your site name', 'elementor' ), + 'error_message' => esc_html__( 'There was a problem setting your site name.', 'elementor' ), ], ]; @@ -204,7 +204,7 @@ private function maybe_update_site_logo() { $data_error = [ 'status' => 'error', 'payload' => [ - 'error_message' => esc_html__( 'There was a problem setting your site logo', 'elementor' ), + 'error_message' => esc_html__( 'There was a problem setting your site logo.', 'elementor' ), ], ]; @@ -254,7 +254,7 @@ private function maybe_update_site_logo() { * @return array */ private function maybe_upload_logo_image() { - $error_message = esc_html__( 'There was a problem uploading your file', 'elementor' ); + $error_message = esc_html__( 'There was a problem uploading your file.', 'elementor' ); $file = Utils::get_super_global_value( $_FILES, 'fileToUpload' ); @@ -339,7 +339,7 @@ private function upload_and_install_pro() { return $this->get_permission_error_response(); } - $error_message = esc_html__( 'There was a problem uploading your file', 'elementor' ); + $error_message = esc_html__( 'There was a problem uploading your file.', 'elementor' ); $file = Utils::get_super_global_value( $_FILES, 'fileToUpload' ) ?? []; diff --git a/assets/dev/js/editor/components/settings/base/manager.js b/assets/dev/js/editor/components/settings/base/manager.js index 0b0abb48d80e..572a6deb5c36 100644 --- a/assets/dev/js/editor/components/settings/base/manager.js +++ b/assets/dev/js/editor/components/settings/base/manager.js @@ -166,7 +166,7 @@ module.exports = elementorModules.ViewModule.extend( { }, error() { // eslint-disable-next-line no-alert - alert( 'An error occurred' ); + alert( 'An error occurred.' ); }, } ); }, diff --git a/assets/dev/js/editor/components/template-library/manager.js b/assets/dev/js/editor/components/template-library/manager.js index f8b422b4c365..4c2b7609b4d0 100644 --- a/assets/dev/js/editor/components/template-library/manager.js +++ b/assets/dev/js/editor/components/template-library/manager.js @@ -218,7 +218,7 @@ TemplateLibraryManager = function() { if ( ! errorDialog ) { errorDialog = elementorCommon.dialogsManager.createWidget( 'alert', { id: 'elementor-template-library-error-dialog', - headerMessage: __( 'An error occurred', 'elementor' ), + headerMessage: __( 'An error occurred.', 'elementor' ), } ); } diff --git a/core/admin/admin-notices.php b/core/admin/admin-notices.php index 1781032f213d..09ede2c85c39 100644 --- a/core/admin/admin-notices.php +++ b/core/admin/admin-notices.php @@ -271,8 +271,7 @@ private function notice_rate_us_feedback() { $options = [ 'title' => esc_html__( 'Congrats!', 'elementor' ), - 'description' => esc_html__( 'You created over 10 pages with Elementor. Great job! If you can spare a minute, - please help us by leaving a five star review on WordPress.org.', 'elementor' ), + 'description' => esc_html__( 'You created over 10 pages with Elementor. Great job! If you can spare a minute, please help us by leaving a five star review on WordPress.org.', 'elementor' ), 'id' => $notice_id, 'button' => [ 'text' => esc_html__( 'Happy To Help', 'elementor' ), diff --git a/includes/controls/groups/background.php b/includes/controls/groups/background.php index d7328b53330e..1a34bd3af294 100644 --- a/includes/controls/groups/background.php +++ b/includes/controls/groups/background.php @@ -92,19 +92,19 @@ public static function get_background_types() { private static function get_default_background_types() { return [ 'classic' => [ - 'title' => esc_html_x( 'Classic', 'Background Control', 'elementor' ), + 'title' => esc_html__( 'Classic', 'elementor' ), 'icon' => 'eicon-paint-brush', ], 'gradient' => [ - 'title' => esc_html_x( 'Gradient', 'Background Control', 'elementor' ), + 'title' => esc_html__( 'Gradient', 'elementor' ), 'icon' => 'eicon-barcode', ], 'video' => [ - 'title' => esc_html_x( 'Video', 'Background Control', 'elementor' ), + 'title' => esc_html__( 'Video', 'elementor' ), 'icon' => 'eicon-video-camera', ], 'slideshow' => [ - 'title' => esc_html_x( 'Slideshow', 'Background Control', 'elementor' ), + 'title' => esc_html__( 'Slideshow', 'elementor' ), 'icon' => 'eicon-slideshow', ], ]; @@ -124,16 +124,16 @@ public function init_fields() { $fields = []; $fields['background'] = [ - 'label' => esc_html_x( 'Background Type', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Background Type', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'render_type' => 'ui', ]; $fields['color'] = [ - 'label' => esc_html_x( 'Color', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Color', 'elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '', - 'title' => esc_html_x( 'Background Color', 'Background Control', 'elementor' ), + 'title' => esc_html__( 'Background Color', 'elementor' ), 'selectors' => [ '{{SELECTOR}}' => 'background-color: {{VALUE}};', ], @@ -158,7 +158,7 @@ public function init_fields() { ]; $fields['color_b'] = [ - 'label' => esc_html_x( 'Second Color', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Second Color', 'elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '#f2295b', 'render_type' => 'ui', @@ -187,8 +187,8 @@ public function init_fields() { 'label' => esc_html_x( 'Type', 'Background Control', 'elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ - 'linear' => esc_html_x( 'Linear', 'Background Control', 'elementor' ), - 'radial' => esc_html_x( 'Radial', 'Background Control', 'elementor' ), + 'linear' => esc_html__( 'Linear', 'elementor' ), + 'radial' => esc_html__( 'Radial', 'elementor' ), ], 'default' => 'linear', 'render_type' => 'ui', @@ -199,7 +199,7 @@ public function init_fields() { ]; $fields['gradient_angle'] = [ - 'label' => esc_html_x( 'Angle', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Angle', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'deg', 'grad', 'rad', 'turn', 'custom' ], 'default' => [ @@ -217,18 +217,18 @@ public function init_fields() { ]; $fields['gradient_position'] = [ - 'label' => esc_html_x( 'Position', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Position', 'elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ - 'center center' => esc_html_x( 'Center Center', 'Background Control', 'elementor' ), - 'center left' => esc_html_x( 'Center Left', 'Background Control', 'elementor' ), - 'center right' => esc_html_x( 'Center Right', 'Background Control', 'elementor' ), - 'top center' => esc_html_x( 'Top Center', 'Background Control', 'elementor' ), - 'top left' => esc_html_x( 'Top Left', 'Background Control', 'elementor' ), - 'top right' => esc_html_x( 'Top Right', 'Background Control', 'elementor' ), - 'bottom center' => esc_html_x( 'Bottom Center', 'Background Control', 'elementor' ), - 'bottom left' => esc_html_x( 'Bottom Left', 'Background Control', 'elementor' ), - 'bottom right' => esc_html_x( 'Bottom Right', 'Background Control', 'elementor' ), + 'center center' => esc_html__( 'Center Center', 'elementor' ), + 'center left' => esc_html__( 'Center Left', 'elementor' ), + 'center right' => esc_html__( 'Center Right', 'elementor' ), + 'top center' => esc_html__( 'Top Center', 'elementor' ), + 'top left' => esc_html__( 'Top Left', 'elementor' ), + 'top right' => esc_html__( 'Top Right', 'elementor' ), + 'bottom center' => esc_html__( 'Bottom Center', 'elementor' ), + 'bottom left' => esc_html__( 'Bottom Left', 'elementor' ), + 'bottom right' => esc_html__( 'Bottom Right', 'elementor' ), ], 'default' => 'center center', 'selectors' => [ @@ -242,7 +242,7 @@ public function init_fields() { ]; $fields['image'] = [ - 'label' => esc_html_x( 'Image', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Image', 'elementor' ), 'type' => Controls_Manager::MEDIA, 'ai' => [ 'category' => 'background', @@ -251,7 +251,7 @@ public function init_fields() { 'active' => true, ], 'responsive' => true, - 'title' => esc_html_x( 'Background Image', 'Background Control', 'elementor' ), + 'title' => esc_html__( 'Background Image', 'elementor' ), 'selectors' => [ '{{SELECTOR}}' => 'background-image: url("{{URL}}");', ], @@ -263,23 +263,23 @@ public function init_fields() { ]; $fields['position'] = [ - 'label' => esc_html_x( 'Position', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Position', 'elementor' ), 'type' => Controls_Manager::SELECT, 'default' => '', 'separator' => 'before', 'responsive' => true, 'options' => [ - '' => esc_html_x( 'Default', 'Background Control', 'elementor' ), - 'center center' => esc_html_x( 'Center Center', 'Background Control', 'elementor' ), - 'center left' => esc_html_x( 'Center Left', 'Background Control', 'elementor' ), - 'center right' => esc_html_x( 'Center Right', 'Background Control', 'elementor' ), - 'top center' => esc_html_x( 'Top Center', 'Background Control', 'elementor' ), - 'top left' => esc_html_x( 'Top Left', 'Background Control', 'elementor' ), - 'top right' => esc_html_x( 'Top Right', 'Background Control', 'elementor' ), - 'bottom center' => esc_html_x( 'Bottom Center', 'Background Control', 'elementor' ), - 'bottom left' => esc_html_x( 'Bottom Left', 'Background Control', 'elementor' ), - 'bottom right' => esc_html_x( 'Bottom Right', 'Background Control', 'elementor' ), - 'initial' => esc_html_x( 'Custom', 'Background Control', 'elementor' ), + '' => esc_html__( 'Default', 'elementor' ), + 'center center' => esc_html__( 'Center Center', 'elementor' ), + 'center left' => esc_html__( 'Center Left', 'elementor' ), + 'center right' => esc_html__( 'Center Right', 'elementor' ), + 'top center' => esc_html__( 'Top Center', 'elementor' ), + 'top left' => esc_html__( 'Top Left', 'elementor' ), + 'top right' => esc_html__( 'Top Right', 'elementor' ), + 'bottom center' => esc_html__( 'Bottom Center', 'elementor' ), + 'bottom left' => esc_html__( 'Bottom Left', 'elementor' ), + 'bottom right' => esc_html__( 'Bottom Right', 'elementor' ), + 'initial' => esc_html__( 'Custom', 'elementor' ), ], 'selectors' => [ @@ -292,7 +292,7 @@ public function init_fields() { ]; $fields['xpos'] = [ - 'label' => esc_html_x( 'X Position', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'X Position', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'responsive' => true, 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ], @@ -335,7 +335,7 @@ public function init_fields() { ]; $fields['ypos'] = [ - 'label' => esc_html_x( 'Y Position', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Y Position', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'responsive' => true, 'size_units' => [ 'px', '%', 'em', 'rem', 'vh', 'custom' ], @@ -382,7 +382,7 @@ public function init_fields() { 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => [ - '' => esc_html_x( 'Default', 'Background Control', 'elementor' ), + '' => esc_html__( 'Default', 'elementor' ), 'scroll' => esc_html_x( 'Scroll', 'Background Control', 'elementor' ), 'fixed' => esc_html_x( 'Fixed', 'Background Control', 'elementor' ), ], @@ -413,11 +413,11 @@ public function init_fields() { 'default' => '', 'responsive' => true, 'options' => [ - '' => esc_html_x( 'Default', 'Background Control', 'elementor' ), - 'no-repeat' => esc_html_x( 'No-repeat', 'Background Control', 'elementor' ), - 'repeat' => esc_html_x( 'Repeat', 'Background Control', 'elementor' ), - 'repeat-x' => esc_html_x( 'Repeat-x', 'Background Control', 'elementor' ), - 'repeat-y' => esc_html_x( 'Repeat-y', 'Background Control', 'elementor' ), + '' => esc_html__( 'Default', 'elementor' ), + 'no-repeat' => esc_html__( 'No-repeat', 'elementor' ), + 'repeat' => esc_html__( 'Repeat', 'elementor' ), + 'repeat-x' => esc_html__( 'Repeat-x', 'elementor' ), + 'repeat-y' => esc_html__( 'Repeat-y', 'elementor' ), ], 'selectors' => [ '{{SELECTOR}}' => 'background-repeat: {{VALUE}};', @@ -429,16 +429,16 @@ public function init_fields() { ]; $fields['size'] = [ - 'label' => esc_html_x( 'Display Size', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Display Size', 'elementor' ), 'type' => Controls_Manager::SELECT, 'responsive' => true, 'default' => '', 'options' => [ - '' => esc_html_x( 'Default', 'Background Control', 'elementor' ), - 'auto' => esc_html_x( 'Auto', 'Background Control', 'elementor' ), - 'cover' => esc_html_x( 'Cover', 'Background Control', 'elementor' ), - 'contain' => esc_html_x( 'Contain', 'Background Control', 'elementor' ), - 'initial' => esc_html_x( 'Custom', 'Background Control', 'elementor' ), + '' => esc_html__( 'Default', 'elementor' ), + 'auto' => esc_html__( 'Auto', 'elementor' ), + 'cover' => esc_html__( 'Cover', 'elementor' ), + 'contain' => esc_html__( 'Contain', 'elementor' ), + 'initial' => esc_html__( 'Custom', 'elementor' ), ], 'selectors' => [ '{{SELECTOR}}' => 'background-size: {{VALUE}};', @@ -450,7 +450,7 @@ public function init_fields() { ]; $fields['bg_width'] = [ - 'label' => esc_html_x( 'Width', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Width', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'responsive' => true, 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ], @@ -485,7 +485,7 @@ public function init_fields() { ]; $fields['video_link'] = [ - 'label' => esc_html_x( 'Video Link', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Video Link', 'elementor' ), 'type' => Controls_Manager::TEXT, 'placeholder' => 'https://www.youtube.com/watch?v=XHOmBV4js_E', 'description' => esc_html__( 'YouTube/Vimeo link, or link to video file (mp4 is recommended).', 'elementor' ), @@ -564,7 +564,7 @@ public function init_fields() { ]; $fields['video_fallback'] = [ - 'label' => esc_html_x( 'Background Fallback', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Background Fallback', 'elementor' ), 'description' => esc_html__( 'This cover image will replace the background video in case that the video could not be loaded.', 'elementor' ), 'type' => Controls_Manager::MEDIA, 'dynamic' => [ @@ -580,7 +580,7 @@ public function init_fields() { ]; $fields['slideshow_gallery'] = [ - 'label' => esc_html_x( 'Images', 'Background Control', 'elementor' ), + 'label' => esc_html__( 'Images', 'elementor' ), 'type' => Controls_Manager::GALLERY, 'condition' => [ 'background' => [ 'slideshow' ], @@ -665,15 +665,15 @@ public function init_fields() { 'responsive' => true, 'options' => [ '' => esc_html__( 'Default', 'elementor' ), - 'center center' => esc_html_x( 'Center Center', 'Background Control', 'elementor' ), - 'center left' => esc_html_x( 'Center Left', 'Background Control', 'elementor' ), - 'center right' => esc_html_x( 'Center Right', 'Background Control', 'elementor' ), - 'top center' => esc_html_x( 'Top Center', 'Background Control', 'elementor' ), - 'top left' => esc_html_x( 'Top Left', 'Background Control', 'elementor' ), - 'top right' => esc_html_x( 'Top Right', 'Background Control', 'elementor' ), - 'bottom center' => esc_html_x( 'Bottom Center', 'Background Control', 'elementor' ), - 'bottom left' => esc_html_x( 'Bottom Left', 'Background Control', 'elementor' ), - 'bottom right' => esc_html_x( 'Bottom Right', 'Background Control', 'elementor' ), + 'center center' => esc_html__( 'Center Center', 'elementor' ), + 'center left' => esc_html__( 'Center Left', 'elementor' ), + 'center right' => esc_html__( 'Center Right', 'elementor' ), + 'top center' => esc_html__( 'Top Center', 'elementor' ), + 'top left' => esc_html__( 'Top Left', 'elementor' ), + 'top right' => esc_html__( 'Top Right', 'elementor' ), + 'bottom center' => esc_html__( 'Bottom Center', 'elementor' ), + 'bottom left' => esc_html__( 'Bottom Left', 'elementor' ), + 'bottom right' => esc_html__( 'Bottom Right', 'elementor' ), ], 'selectors' => [ '{{WRAPPER}} .elementor-background-slideshow__slide__image' => 'background-position: {{VALUE}};', diff --git a/includes/controls/groups/border.php b/includes/controls/groups/border.php index b3c6e413b2fa..eac53e6b1014 100644 --- a/includes/controls/groups/border.php +++ b/includes/controls/groups/border.php @@ -57,16 +57,16 @@ protected function init_fields() { $fields = []; $fields['border'] = [ - 'label' => esc_html_x( 'Border Type', 'Border Control', 'elementor' ), + 'label' => esc_html__( 'Border Type', 'elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ '' => esc_html__( 'Default', 'elementor' ), 'none' => esc_html__( 'None', 'elementor' ), - 'solid' => esc_html_x( 'Solid', 'Border Control', 'elementor' ), - 'double' => esc_html_x( 'Double', 'Border Control', 'elementor' ), - 'dotted' => esc_html_x( 'Dotted', 'Border Control', 'elementor' ), - 'dashed' => esc_html_x( 'Dashed', 'Border Control', 'elementor' ), - 'groove' => esc_html_x( 'Groove', 'Border Control', 'elementor' ), + 'solid' => esc_html__( 'Solid', 'elementor' ), + 'double' => esc_html__( 'Double', 'elementor' ), + 'dotted' => esc_html__( 'Dotted', 'elementor' ), + 'dashed' => esc_html__( 'Dashed', 'elementor' ), + 'groove' => esc_html__( 'Groove', 'elementor' ), ], 'selectors' => [ '{{SELECTOR}}' => 'border-style: {{VALUE}};', @@ -74,7 +74,7 @@ protected function init_fields() { ]; $fields['width'] = [ - 'label' => esc_html_x( 'Width', 'Border Control', 'elementor' ), + 'label' => esc_html__( 'Border Width', 'elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', 'rem', 'vw', 'custom' ], 'selectors' => [ @@ -87,7 +87,7 @@ protected function init_fields() { ]; $fields['color'] = [ - 'label' => esc_html_x( 'Color', 'Border Control', 'elementor' ), + 'label' => esc_html__( 'Border Color', 'elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ diff --git a/includes/controls/groups/box-shadow.php b/includes/controls/groups/box-shadow.php index de696aa50e99..1c068c900db0 100644 --- a/includes/controls/groups/box-shadow.php +++ b/includes/controls/groups/box-shadow.php @@ -58,7 +58,7 @@ protected function init_fields() { $controls = []; $controls['box_shadow'] = [ - 'label' => esc_html_x( 'Box Shadow', 'Box Shadow Control', 'elementor' ), + 'label' => esc_html__( 'Box Shadow', 'elementor' ), 'type' => Controls_Manager::BOX_SHADOW, 'selectors' => [ '{{SELECTOR}}' => 'box-shadow: {{HORIZONTAL}}px {{VERTICAL}}px {{BLUR}}px {{SPREAD}}px {{COLOR}} {{box_shadow_position.VALUE}};', @@ -66,7 +66,7 @@ protected function init_fields() { ]; $controls['box_shadow_position'] = [ - 'label' => esc_html_x( 'Position', 'Box Shadow Control', 'elementor' ), + 'label' => esc_html__( 'Position', 'elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ ' ' => esc_html_x( 'Outline', 'Box Shadow Control', 'elementor' ), @@ -93,7 +93,7 @@ protected function init_fields() { protected function get_default_options() { return [ 'popover' => [ - 'starter_title' => esc_html_x( 'Box Shadow', 'Box Shadow Control', 'elementor' ), + 'starter_title' => esc_html__( 'Box Shadow', 'elementor' ), 'starter_name' => 'box_shadow_type', 'starter_value' => 'yes', 'settings' => [ diff --git a/includes/controls/groups/css-filter.php b/includes/controls/groups/css-filter.php index b5ba47d09b01..f6e06cab076f 100644 --- a/includes/controls/groups/css-filter.php +++ b/includes/controls/groups/css-filter.php @@ -163,7 +163,7 @@ protected function get_default_options() { return [ 'popover' => [ 'starter_name' => 'css_filter', - 'starter_title' => esc_html_x( 'CSS Filters', 'Filter Control', 'elementor' ), + 'starter_title' => esc_html__( 'CSS Filters', 'elementor' ), 'settings' => [ 'render_type' => 'ui', ], diff --git a/includes/controls/groups/flex-container.php b/includes/controls/groups/flex-container.php index 4a4afb99e9c9..8924a12d694b 100644 --- a/includes/controls/groups/flex-container.php +++ b/includes/controls/groups/flex-container.php @@ -26,23 +26,23 @@ protected function init_fields() { ]; $fields['direction'] = [ - 'label' => esc_html_x( 'Direction', 'Flex Container Control', 'elementor' ), + 'label' => esc_html__( 'Direction', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'row' => [ - 'title' => esc_html_x( 'Row - horizontal', 'Flex Container Control', 'elementor' ), + 'title' => esc_html__( 'Row - horizontal', 'elementor' ), 'icon' => 'eicon-arrow-' . $end, ], 'column' => [ - 'title' => esc_html_x( 'Column - vertical', 'Flex Container Control', 'elementor' ), + 'title' => esc_html__( 'Column - vertical', 'elementor' ), 'icon' => 'eicon-arrow-down', ], 'row-reverse' => [ - 'title' => esc_html_x( 'Row - reversed', 'Flex Container Control', 'elementor' ), + 'title' => esc_html__( 'Row - reversed', 'elementor' ), 'icon' => 'eicon-arrow-' . $start, ], 'column-reverse' => [ - 'title' => esc_html_x( 'Column - reversed', 'Flex Container Control', 'elementor' ), + 'title' => esc_html__( 'Column - reversed', 'elementor' ), 'icon' => 'eicon-arrow-up', ], ], @@ -88,7 +88,7 @@ protected function init_fields() { ] ); $fields['justify_content'] = [ - 'label' => esc_html_x( 'Justify Content', 'Flex Container Control', 'elementor' ), + 'label' => esc_html__( 'Justify Content', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => true, 'default' => '', @@ -106,15 +106,15 @@ protected function init_fields() { 'icon' => 'eicon-flex eicon-justify-end-h', ], 'space-between' => [ - 'title' => esc_html_x( 'Space Between', 'Flex Container Control', 'elementor' ), + 'title' => esc_html__( 'Space Between', 'elementor' ), 'icon' => 'eicon-flex eicon-justify-space-between-h', ], 'space-around' => [ - 'title' => esc_html_x( 'Space Around', 'Flex Container Control', 'elementor' ), + 'title' => esc_html__( 'Space Around', 'elementor' ), 'icon' => 'eicon-flex eicon-justify-space-around-h', ], 'space-evenly' => [ - 'title' => esc_html_x( 'Space Evenly', 'Flex Container Control', 'elementor' ), + 'title' => esc_html__( 'Space Evenly', 'elementor' ), 'icon' => 'eicon-flex eicon-justify-space-evenly-h', ], ], @@ -125,7 +125,7 @@ protected function init_fields() { ]; $fields['align_items'] = [ - 'label' => esc_html_x( 'Align Items', 'Flex Container Control', 'elementor' ), + 'label' => esc_html__( 'Align Items', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'default' => '', 'options' => [ @@ -142,7 +142,7 @@ protected function init_fields() { 'icon' => 'eicon-flex eicon-align-end-v', ], 'stretch' => [ - 'title' => esc_html_x( 'Stretch', 'Flex Container Control', 'elementor' ), + 'title' => esc_html__( 'Stretch', 'elementor' ), 'icon' => 'eicon-flex eicon-align-stretch-v', ], ], @@ -188,11 +188,7 @@ protected function init_fields() { 'icon' => 'eicon-flex eicon-wrap', ], ], - 'description' => esc_html_x( - 'Items within the container can stay in a single line (No wrap), or break into multiple lines (Wrap).', - 'Flex Container Control', - 'elementor' - ), + 'description' => esc_html__( 'Items within the container can stay in a single line (No wrap), or break into multiple lines (Wrap).', 'elementor' ), 'default' => '', 'selectors' => [ '{{SELECTOR}}' => '--flex-wrap: {{VALUE}};', @@ -201,17 +197,17 @@ protected function init_fields() { ]; $fields['align_content'] = [ - 'label' => esc_html_x( 'Align Content', 'Flex Container Control', 'elementor' ), + 'label' => esc_html__( 'Align Content', 'elementor' ), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => [ - '' => esc_html_x( 'Default', 'Flex Container Control', 'elementor' ), - 'center' => esc_html_x( 'Center', 'Flex Container Control', 'elementor' ), - 'flex-start' => esc_html_x( 'Flex Start', 'Flex Container Control', 'elementor' ), - 'flex-end' => esc_html_x( 'Flex End', 'Flex Container Control', 'elementor' ), - 'space-between' => esc_html_x( 'Space Between', 'Flex Container Control', 'elementor' ), - 'space-around' => esc_html_x( 'Space Around', 'Flex Container Control', 'elementor' ), - 'space-evenly' => esc_html_x( 'Space Evenly', 'Flex Container Control', 'elementor' ), + '' => esc_html__( 'Default', 'elementor' ), + 'center' => esc_html__( 'Center', 'elementor' ), + 'flex-start' => esc_html__( 'Start', 'elementor' ), + 'flex-end' => esc_html__( 'End', 'elementor' ), + 'space-between' => esc_html__( 'Space Between', 'elementor' ), + 'space-around' => esc_html__( 'Space Around', 'elementor' ), + 'space-evenly' => esc_html__( 'Space Evenly', 'elementor' ), ], 'selectors' => [ '{{SELECTOR}}' => '--align-content: {{VALUE}};', diff --git a/includes/controls/groups/flex-item.php b/includes/controls/groups/flex-item.php index 806e41bd6443..b12a24c52000 100644 --- a/includes/controls/groups/flex-item.php +++ b/includes/controls/groups/flex-item.php @@ -17,17 +17,17 @@ protected function init_fields() { $fields = []; $fields['basis_type'] = [ - 'label' => esc_html_x( 'Flex Basis', 'Flex Item Control', 'elementor' ), + 'label' => esc_html__( 'Flex Basis', 'elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ - '' => esc_html_x( 'Default', 'Flex Item Control', 'elementor' ), - 'custom' => esc_html_x( 'Custom', 'Flex Item Control', 'elementor' ), + '' => esc_html__( 'Default', 'elementor' ), + 'custom' => esc_html__( 'Custom', 'elementor' ), ], 'responsive' => true, ]; $fields['basis'] = [ - 'label' => esc_html_x( 'Custom Width', 'Flex Item Control', 'elementor' ), + 'label' => esc_html__( 'Custom Width', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ @@ -57,7 +57,7 @@ protected function init_fields() { ]; $fields['align_self'] = [ - 'label' => esc_html_x( 'Align Self', 'Flex Item Control', 'elementor' ), + 'label' => esc_html__( 'Align Self', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'flex-start' => [ @@ -73,7 +73,7 @@ protected function init_fields() { 'icon' => 'eicon-flex eicon-align-end-v', ], 'stretch' => [ - 'title' => esc_html_x( 'Stretch', 'Flex Item Control', 'elementor' ), + 'title' => esc_html__( 'Stretch', 'elementor' ), 'icon' => 'eicon-flex eicon-align-stretch-v', ], ], @@ -82,11 +82,11 @@ protected function init_fields() { '{{SELECTOR}}' => '--align-self: {{VALUE}};', ], 'responsive' => true, - 'description' => esc_html_x( 'This control will affect contained elements only.', 'Flex Item Control', 'elementor' ), + 'description' => esc_html__( 'This control will affect contained elements only.', 'elementor' ), ]; $fields['order'] = [ - 'label' => esc_html_x( 'Order', 'Flex Item Control', 'elementor' ), + 'label' => esc_html__( 'Order', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'default' => '', 'options' => [ @@ -99,7 +99,7 @@ protected function init_fields() { 'icon' => 'eicon-flex eicon-order-end', ], 'custom' => [ - 'title' => esc_html_x( 'Custom', 'Flex Item Control', 'elementor' ), + 'title' => esc_html__( 'Custom', 'elementor' ), 'icon' => 'eicon-ellipsis-v', ], ], @@ -115,11 +115,11 @@ protected function init_fields() { '{{SELECTOR}}' => '--order: {{VALUE}};', ], 'responsive' => true, - 'description' => esc_html_x( 'This control will affect contained elements only.', 'Flex Item Control', 'elementor' ), + 'description' => esc_html__( 'This control will affect contained elements only.', 'elementor' ), ]; $fields['order_custom'] = [ - 'label' => esc_html_x( 'Custom Order', 'Flex Item Control', 'elementor' ), + 'label' => esc_html__( 'Custom Order', 'elementor' ), 'type' => Controls_Manager::NUMBER, 'selectors' => [ '{{SELECTOR}}' => '--order: {{VALUE}};', @@ -131,24 +131,24 @@ protected function init_fields() { ]; $fields['size'] = [ - 'label' => esc_html_x( 'Size', 'Flex Item Control', 'elementor' ), + 'label' => esc_html__( 'Size', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'default' => '', 'options' => [ 'none' => [ - 'title' => esc_html_x( 'None', 'Flex Item Control', 'elementor' ), + 'title' => esc_html__( 'None', 'elementor' ), 'icon' => 'eicon-ban', ], 'grow' => [ - 'title' => esc_html_x( 'Grow', 'Flex Item Control', 'elementor' ), + 'title' => esc_html__( 'Grow', 'elementor' ), 'icon' => 'eicon-grow', ], 'shrink' => [ - 'title' => esc_html_x( 'Shrink', 'Flex Item Control', 'elementor' ), + 'title' => esc_html__( 'Shrink', 'elementor' ), 'icon' => 'eicon-shrink', ], 'custom' => [ - 'title' => esc_html_x( 'Custom', 'Flex Item Control', 'elementor' ), + 'title' => esc_html__( 'Custom', 'elementor' ), 'icon' => 'eicon-ellipsis-v', ], ], @@ -165,7 +165,7 @@ protected function init_fields() { ]; $fields['grow'] = [ - 'label' => esc_html_x( 'Flex Grow', 'Flex Item Control', 'elementor' ), + 'label' => esc_html__( 'Flex Grow', 'elementor' ), 'type' => Controls_Manager::NUMBER, 'selectors' => [ '{{SELECTOR}}' => '--flex-grow: {{VALUE}};', @@ -179,7 +179,7 @@ protected function init_fields() { ]; $fields['shrink'] = [ - 'label' => esc_html_x( 'Flex Shrink', 'Flex Item Control', 'elementor' ), + 'label' => esc_html__( 'Flex Shrink', 'elementor' ), 'type' => Controls_Manager::NUMBER, 'selectors' => [ '{{SELECTOR}}' => '--flex-shrink: {{VALUE}};', diff --git a/includes/controls/groups/grid-container.php b/includes/controls/groups/grid-container.php index 55df9bcb8aed..9024cc901e76 100644 --- a/includes/controls/groups/grid-container.php +++ b/includes/controls/groups/grid-container.php @@ -128,7 +128,7 @@ protected function init_fields() { ] + $this->get_responsive_autoflow_defaults(); $fields['justify_items'] = [ - 'label' => esc_html_x( 'Justify Items', 'Grid Container Control', 'elementor' ), + 'label' => esc_html__( 'Justify Items', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'start' => [ @@ -144,7 +144,7 @@ protected function init_fields() { 'icon' => 'eicon-align-' . $icon_end . '-h', ], 'stretch' => [ - 'title' => esc_html_x( 'Stretch', 'Grid Container Control', 'elementor' ), + 'title' => esc_html__( 'Stretch', 'elementor' ), 'icon' => 'eicon-align-stretch-h', ], ], @@ -156,7 +156,7 @@ protected function init_fields() { ]; $fields['align_items'] = [ - 'label' => esc_html_x( 'Align Items', 'Grid Container Control', 'elementor' ), + 'label' => esc_html__( 'Align Items', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'start' => [ @@ -172,7 +172,7 @@ protected function init_fields() { 'icon' => 'eicon-align-end-v', ], 'stretch' => [ - 'title' => esc_html_x( 'Stretch', 'Grid Container Control', 'elementor' ), + 'title' => esc_html__( 'Stretch', 'elementor' ), 'icon' => 'eicon-align-stretch-v', ], ], @@ -183,7 +183,7 @@ protected function init_fields() { ]; $fields['justify_content'] = [ - 'label' => esc_html_x( 'Justify Content', 'Grid Container Control', 'elementor' ), + 'label' => esc_html__( 'Justify Content', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => true, 'default' => '', @@ -201,15 +201,15 @@ protected function init_fields() { 'icon' => 'eicon-justify-end-h', ], 'space-between' => [ - 'title' => esc_html_x( 'Space Between', 'Grid Container Control', 'elementor' ), + 'title' => esc_html__( 'Space Between', 'elementor' ), 'icon' => 'eicon-justify-space-between-h', ], 'space-around' => [ - 'title' => esc_html_x( 'Space Around', 'Grid Container Control', 'elementor' ), + 'title' => esc_html__( 'Space Around', 'elementor' ), 'icon' => 'eicon-justify-space-around-h', ], 'space-evenly' => [ - 'title' => esc_html_x( 'Space Evenly', 'Grid Container Control', 'elementor' ), + 'title' => esc_html__( 'Space Evenly', 'elementor' ), 'icon' => 'eicon-justify-space-evenly-h', ], ], @@ -223,7 +223,7 @@ protected function init_fields() { ]; $fields['align_content'] = [ - 'label' => esc_html_x( 'Align Content', 'Grid Container Control', 'elementor' ), + 'label' => esc_html__( 'Align Content', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => true, 'default' => '', @@ -241,15 +241,15 @@ protected function init_fields() { 'icon' => 'eicon-justify-end-v', ], 'space-between' => [ - 'title' => esc_html_x( 'Space Between', 'Grid Container Control', 'elementor' ), + 'title' => esc_html__( 'Space Between', 'elementor' ), 'icon' => 'eicon-justify-space-between-v', ], 'space-around' => [ - 'title' => esc_html_x( 'Space Around', 'Grid Container Control', 'elementor' ), + 'title' => esc_html__( 'Space Around', 'elementor' ), 'icon' => 'eicon-justify-space-around-v', ], 'space-evenly' => [ - 'title' => esc_html_x( 'Space Evenly', 'Grid Container Control', 'elementor' ), + 'title' => esc_html__( 'Space Evenly', 'elementor' ), 'icon' => 'eicon-justify-space-evenly-v', ], ], diff --git a/includes/controls/groups/image-size.php b/includes/controls/groups/image-size.php index 57b208b53a64..ddb6723c05b8 100644 --- a/includes/controls/groups/image-size.php +++ b/includes/controls/groups/image-size.php @@ -287,12 +287,12 @@ protected function init_fields() { $fields = []; $fields['size'] = [ - 'label' => esc_html_x( 'Image Size', 'Image Size Control', 'elementor' ), + 'label' => esc_html__( 'Image Size', 'elementor' ), 'type' => Controls_Manager::SELECT, ]; $fields['custom_dimension'] = [ - 'label' => esc_html_x( 'Image Dimension', 'Image Size Control', 'elementor' ), + 'label' => esc_html__( 'Image Dimension', 'elementor' ), 'type' => Controls_Manager::IMAGE_DIMENSIONS, 'description' => esc_html__( 'You can crop the original image size to any custom size. You can also set a single value for height or width in order to keep the original size ratio.', 'elementor' ), 'condition' => [ @@ -372,10 +372,10 @@ private function get_image_sizes() { $image_sizes[ $size_key ] = $control_title; } - $image_sizes['full'] = esc_html_x( 'Full', 'Image Size Control', 'elementor' ); + $image_sizes['full'] = esc_html__( 'Full', 'elementor' ); if ( ! empty( $args['include']['custom'] ) || ! in_array( 'custom', $args['exclude'] ) ) { - $image_sizes['custom'] = esc_html_x( 'Custom', 'Image Size Control', 'elementor' ); + $image_sizes['custom'] = esc_html__( 'Custom', 'elementor' ); } return $image_sizes; diff --git a/includes/controls/groups/text-shadow.php b/includes/controls/groups/text-shadow.php index 76da35e4e90b..d587b60ada0e 100644 --- a/includes/controls/groups/text-shadow.php +++ b/includes/controls/groups/text-shadow.php @@ -58,7 +58,7 @@ protected function init_fields() { $controls = []; $controls['text_shadow'] = [ - 'label' => _x( 'Text Shadow', 'Text Shadow Control', 'elementor' ), + 'label' => esc_html__( 'Text Shadow', 'elementor' ), 'type' => Controls_Manager::TEXT_SHADOW, 'selectors' => [ '{{SELECTOR}}' => 'text-shadow: {{HORIZONTAL}}px {{VERTICAL}}px {{BLUR}}px {{COLOR}};', @@ -82,7 +82,7 @@ protected function init_fields() { protected function get_default_options() { return [ 'popover' => [ - 'starter_title' => _x( 'Text Shadow', 'Text Shadow Control', 'elementor' ), + 'starter_title' => esc_html__( 'Text Shadow', 'elementor' ), 'starter_name' => 'text_shadow_type', 'starter_value' => 'yes', 'settings' => [ diff --git a/includes/controls/groups/text-stroke.php b/includes/controls/groups/text-stroke.php index d778ab4ab2a8..84e4dae1548b 100644 --- a/includes/controls/groups/text-stroke.php +++ b/includes/controls/groups/text-stroke.php @@ -110,7 +110,7 @@ protected function init_fields() { protected function get_default_options() { return [ 'popover' => [ - 'starter_title' => esc_html_x( 'Text Stroke', 'Text Stroke Control', 'elementor' ), + 'starter_title' => esc_html__( 'Text Stroke', 'elementor' ), 'starter_name' => 'text_stroke_type', 'starter_value' => 'yes', 'settings' => [ diff --git a/includes/controls/groups/typography.php b/includes/controls/groups/typography.php index 9c9742eb0bd6..4c3ca03270ad 100644 --- a/includes/controls/groups/typography.php +++ b/includes/controls/groups/typography.php @@ -142,7 +142,7 @@ protected function init_fields() { '700' => '700 ' . esc_html_x( '(Bold)', 'Typography Control', 'elementor' ), '800' => '800 ' . esc_html_x( '(Extra Bold)', 'Typography Control', 'elementor' ), '900' => '900 ' . esc_html_x( '(Black)', 'Typography Control', 'elementor' ), - '' => esc_html_x( 'Default', 'Typography Control', 'elementor' ), + '' => esc_html__( 'Default', 'elementor' ), 'normal' => esc_html_x( 'Normal', 'Typography Control', 'elementor' ), 'bold' => esc_html_x( 'Bold', 'Typography Control', 'elementor' ), ], @@ -187,7 +187,7 @@ protected function init_fields() { ]; $fields['line_height'] = [ - 'label' => esc_html_x( 'Line-Height', 'Typography Control', 'elementor' ), + 'label' => esc_html__( 'Line Height', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'desktop_default' => [ 'unit' => 'em', @@ -209,7 +209,7 @@ protected function init_fields() { ]; $fields['letter_spacing'] = [ - 'label' => esc_html_x( 'Letter Spacing', 'Typography Control', 'elementor' ), + 'label' => esc_html__( 'Letter Spacing', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em', 'rem', 'custom' ], 'range' => [ @@ -227,7 +227,7 @@ protected function init_fields() { ]; $fields['word_spacing'] = [ - 'label' => esc_html_x( 'Word Spacing', 'Typography Control', 'elementor' ), + 'label' => esc_html__( 'Word Spacing', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'desktop_default' => [ 'unit' => 'em', @@ -332,7 +332,7 @@ protected function get_default_options() { return [ 'popover' => [ 'starter_name' => 'typography', - 'starter_title' => esc_html_x( 'Typography', 'Typography Control', 'elementor' ), + 'starter_title' => esc_html__( 'Typography', 'elementor' ), 'settings' => [ 'render_type' => 'ui', 'groupType' => 'typography', diff --git a/includes/controls/repeater.php b/includes/controls/repeater.php index 61250f6813ef..41f39e0dbea2 100644 --- a/includes/controls/repeater.php +++ b/includes/controls/repeater.php @@ -171,7 +171,7 @@ public function content_template() {