Skip to content

Commit 6af535d

Browse files
authored
Merge pull request #670 from analogwp/release-v2.0.9
Release v2.0.9
2 parents c78a56e + 2ca49c1 commit 6af535d

17 files changed

+347
-302
lines changed

analogwp-templates.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@
1010
* Plugin Name: Style Kits for Elementor
1111
* Plugin URI: https://analogwp.com/
1212
* Description: Style Kits extends the Elementor theme styles editor with more global styling options. Boost your design workflow in Elementor with intuitive global controls and theme style presets.
13-
* Version: 2.0.8
13+
* Version: 2.0.9
1414
* Author: AnalogWP
1515
* Author URI: https://analogwp.com/
1616
* License: GPL2
1717
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
1818
* Text Domain: ang
19-
* Elementor tested up to: 3.18.2
20-
* Elementor Pro tested up to: 3.18.1
19+
* Elementor tested up to: 3.21.1
20+
* Elementor Pro tested up to: 3.21.0
2121
*/
2222

2323
defined( 'ABSPATH' ) || exit;
2424

2525
define( 'ANG_ELEMENTOR_MINIMUM', '3.10.0' );
2626
define( 'ANG_PHP_MINIMUM', '7.0' );
2727
define( 'ANG_WP_MINIMUM', '6.0' );
28-
define( 'ANG_VERSION', '2.0.8' );
28+
define( 'ANG_VERSION', '2.0.9' );
2929
define( 'ANG_PLUGIN_FILE', __FILE__ );
3030
define( 'ANG_PLUGIN_URL', plugin_dir_url( ANG_PLUGIN_FILE ) );
3131
define( 'ANG_PLUGIN_DIR', plugin_dir_path( ANG_PLUGIN_FILE ) );

assets/css/sk-components.css

+3-2
Original file line numberDiff line numberDiff line change
@@ -1157,11 +1157,11 @@
11571157
* Legacy features
11581158
*/
11591159

1160-
.elementor-control.elementor-control-ang_section_padding {
1160+
.elementor-control.elementor-control-ang_buttons {
11611161
margin-top: 40px;
11621162
}
11631163

1164-
.elementor-control.elementor-control-ang_section_padding::before {
1164+
.elementor-control.elementor-control-ang_buttons::before {
11651165
content: " ";
11661166
width: 100%;
11671167
height: 1px;
@@ -1172,6 +1172,7 @@
11721172
position: absolute;
11731173
}
11741174

1175+
.elementor-control.elementor-control-ang_buttons .elementor-control-content::after,
11751176
.elementor-control.elementor-control-ang_section_padding .elementor-control-content::after,
11761177
.elementor-control.elementor-control-ang_column_gaps .elementor-control-content::after,
11771178
.elementor-control.elementor-control-ang_colors .elementor-control-content::after {

inc/class-elementor.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ public function enqueue_editor_scripts() {
147147
if ( $is_legacy_hidden ) {
148148
wp_add_inline_style(
149149
'analogwp-components-css',
150-
'.elementor-control.elementor-control-ang_section_padding,
150+
'.elementor-control.elementor-control-ang_buttons,
151+
.elementor-control.elementor-control-ang_section_padding,
151152
.elementor-control.elementor-control-ang_column_gaps,
152153
.elementor-control.elementor-control-ang_colors {
153154
display: none !important;

inc/class-onboarding.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ public function get_steps() {
102102
),
103103
array(
104104
'id' => 'enable-el-container-experiment',
105-
'label' => __( 'Enable Elementor container experiment', 'ang' ),
106-
'description' => __( 'The latest Style Kits version works best with flexbox containers. We will enable the Containers experiment in Elementor.', 'ang' ),
107-
'label_success' => __( 'Container experiment is now active', 'ang' ),
105+
'label' => __( 'Enable Elementor container feature', 'ang' ),
106+
'description' => __( 'The latest Style Kits version works best with flexbox containers. We will enable the Containers feature in Elementor.', 'ang' ),
107+
'label_success' => __( 'Container feature is now active', 'ang' ),
108108
'label_failed' => __( 'Failed to activate Elementor container experiment', 'ang' ),
109109
'checked' => true,
110110
'todo' => ! did_action( 'elementor/loaded' ) || ( method_exists( '\Analog\Utils', 'is_elementor_container' ) && ! \Analog\Utils::is_elementor_container() ),

inc/elementor/class-typography.php

+35-22
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ public function __construct() {
7373
$this->settings_tab = Utils::get_kit_settings_tab();
7474

7575
add_action( 'elementor/element/kit/section_buttons/after_section_end', array( $this, 'register_typography_sizes' ), 30, 2 );
76-
add_action( 'elementor/element/kit/section_buttons/after_section_end', array( $this, 'register_buttons' ), 40, 2 );
7776
add_action( 'elementor/element/after_section_end', array( $this, 'register_styling_settings' ), 20, 2 );
7877
add_action( 'elementor/element/kit/section_buttons/after_section_end', array( $this, 'register_tools' ), 270, 2 );
7978

80-
// Legacy features ( Outer Section Padding & Column Gaps ) - deprecated to be removed.
79+
// Legacy features ( Button Sizes, Outer Section Padding and Column Gaps ) - deprecated to be removed.
80+
add_action( 'elementor/element/kit/section_buttons/after_section_end', array( $this, 'register_buttons' ), 275, 2 );
8181
add_action( 'elementor/element/kit/section_buttons/after_section_end', array( $this, 'register_outer_section_padding' ), 280, 2 );
8282
add_action( 'elementor/element/kit/section_buttons/after_section_end', array( $this, 'register_columns_gap' ), 290, 2 );
8383

@@ -103,7 +103,10 @@ public function __construct() {
103103
add_action( 'elementor/element/kit/section_buttons/after_section_end', array( $this, 'register_global_fonts' ), 10, 2 );
104104

105105
add_action( 'elementor/element/heading/section_title/after_section_end', array( $this, 'add_typo_helper_link' ), 999, 2 );
106-
add_action( 'elementor/element/button/section_button/after_section_end', array( $this, 'add_btn_sizes_helper_link' ), 999, 2 );
106+
107+
if ( Utils::is_elementor_pre( '3.20.0' ) ) {
108+
add_action( 'elementor/element/button/section_button/after_section_end', array( $this, 'add_btn_sizes_helper_link' ), 999, 2 );
109+
}
107110

108111
add_action( 'elementor/element/kit/section_buttons/after_section_end', array( $this, 'register_shadows' ), 47, 2 );
109112

@@ -201,9 +204,9 @@ public function register_heading_typography( Controls_Stack $element, $section_i
201204
/* translators: %s: Heading 1-6 type */
202205
'label' => sprintf( __( 'Heading %s', 'ang' ), $i ),
203206
'selector' => "{$selector} h{$i}, {$selector} .elementor-widget-heading h{$i}.elementor-heading-title",
204-
'global' => [
207+
'global' => array(
205208
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
206-
],
209+
),
207210
)
208211
);
209212
}
@@ -251,9 +254,9 @@ public function register_body_and_paragraph_typography( Controls_Stack $element,
251254
'name' => 'ang_body',
252255
'label' => __( 'Body Typography', 'ang' ),
253256
'selector' => '{{WRAPPER}}',
254-
'global' => [
257+
'global' => array(
255258
'default' => Global_Typography::TYPOGRAPHY_TEXT,
256-
],
259+
),
257260
)
258261
);
259262

@@ -324,9 +327,9 @@ public function register_typography_sizes( Controls_Stack $element, $section_id
324327
array(
325328
'name' => 'ang_size_' . $setting[0],
326329
'label' => __( 'Heading', 'ang' ) . ' ' . $setting[1],
327-
'global' => [
330+
'global' => array(
328331
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
329-
],
332+
),
330333
'selector' => $selectors,
331334
'exclude' => $size_controls,
332335
)
@@ -365,9 +368,9 @@ public function register_typography_sizes( Controls_Stack $element, $section_id
365368
array(
366369
'name' => 'ang_text_size_' . $setting[0],
367370
'label' => __( 'Text', 'ang' ) . ' ' . $setting[1],
368-
'global' => [
371+
'global' => array(
369372
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
370-
],
373+
),
371374
'selector' => "{{WRAPPER}} .elementor-widget-heading .elementor-heading-title.elementor-size-{$setting[0]}:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6)",
372375
'exclude' => $size_controls,
373376
)
@@ -778,17 +781,21 @@ public function register_columns_gap( Controls_Stack $element, $section_id ) {
778781
)
779782
);
780783

781-
$elementor_row = '';
782-
$optimized_dom = get_option( 'elementor_experiment-e_dom_optimization' );
783-
$is_optimize_dom = \Elementor\Core\Experiments\Manager::STATE_ACTIVE === $optimized_dom;
784+
$elementor_row = '';
784785

785-
if ( 'default' === $optimized_dom ) {
786-
$experiments = new \Elementor\Core\Experiments\Manager();
787-
$is_optimize_dom = $experiments->is_feature_active( 'e_dom_optimization' );
788-
}
786+
if ( Utils::is_elementor_pre( '3.19.0' ) ) {
787+
788+
$optimized_dom = get_option( 'elementor_experiment-e_dom_optimization' );
789+
$is_optimize_dom = \Elementor\Core\Experiments\Manager::STATE_ACTIVE === $optimized_dom;
790+
791+
if ( 'default' === $optimized_dom ) {
792+
$experiments = new \Elementor\Core\Experiments\Manager();
793+
$is_optimize_dom = $experiments->is_feature_active( 'e_dom_optimization' );
794+
}
789795

790-
if ( ! $is_optimize_dom ) { // Add row class if DOM optimization is not active.
791-
$elementor_row = ' > .elementor-row ';
796+
if ( ! $is_optimize_dom ) { // Add row class if DOM optimization is not active.
797+
$elementor_row = ' > .elementor-row ';
798+
}
792799
}
793800

794801
foreach ( $gaps as $key => $label ) {
@@ -840,7 +847,13 @@ public function register_buttons( Controls_Stack $element, $section_id ) {
840847
$element->add_control(
841848
'ang_buttons_description',
842849
array(
843-
'raw' => __( 'Define the default styles for every button size.', 'ang' ) . sprintf( ' <a href="%1$s" target="_blank">%2$s</a>', 'https://analogwp.com/docs/button-sizes/', __( 'Learn more.', 'ang' ) ),
850+
'raw' => sprintf(
851+
'%1$s<br/>%2$s <a href="%3$s" target="_blank">%4$s</a>',
852+
__( 'Heads-up! This is a legacy feature, no longer supported in Elementor.', 'ang' ),
853+
__( 'Define the default styles for every button size.', 'ang' ),
854+
'https://analogwp.com/docs/button-sizes/',
855+
__( 'Learn more.', 'ang' )
856+
),
844857
'type' => Controls_Manager::RAW_HTML,
845858
'content_classes' => 'elementor-descriptor',
846859
)
@@ -1375,7 +1388,7 @@ public function enqueue_preview_scripts() {
13751388
$page_settings_model = $page_settings_manager->get_model( $post_id );
13761389

13771390
$keys = apply_filters(
1378-
'analog/elementor/typography/keys',
1391+
'analog/elementor/typography/keys', // phpcs:ignore.
13791392
array(
13801393
'ang_heading_1',
13811394
'ang_heading_2',

inc/settings/class-settings-experiments.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,20 @@ public function get_settings() {
4545
'title' => __( 'Style Kits Experiments', 'ang' ),
4646
'desc' => sprintf(
4747
/* translators: %s: Style Kits Experiments Documentation link */
48-
__( 'Below you can activate experimental features for Style Kits and Style Kits Pro. We suggest that you don’t use these features on a production site. %s about how this works.', 'ang' ),
48+
__( 'Below you can activate experimental features for Style Kits and Style Kits Pro. We suggest you to turn on backups while using these experiments. %s about how this works.', 'ang' ),
4949
'<a href="https://analogwp.com/docs/style-kits-experiments/" target="_blank">' . __( 'Learn more', 'ang' ) . '</a>'
5050
),
5151
'type' => 'title',
5252
'id' => 'ang_experiments',
5353
),
5454
array(
5555
'title' => __( 'Container-based Library', 'ang' ),
56-
'desc' => __( 'Get early access to the upcoming container-based library of Patterns. You need to have the Containers experiment activated in Elementor, to test the new library.', 'ang' ),
56+
'desc' => __( 'Get access to the container-based library of Patterns. You need to have the Containers Feature activated in Elementor, to test the new library.', 'ang' ),
5757
'id' => 'container_library_experiment',
5858
'default' => 'default',
5959
'type' => 'select',
6060
'options' => $options,
6161
),
62-
6362
array(
6463
'type' => 'sectionend',
6564
'id' => 'ang_beta',

languages/ang-analogwp-app.json

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)