Skip to content

Commit

Permalink
Merge pull request #678 from analogwp/release-v2.3.0
Browse files Browse the repository at this point in the history
Release v2.3.0
  • Loading branch information
lushkant authored Dec 6, 2024
2 parents 33d2b01 + 148cd6f commit d4078a1
Show file tree
Hide file tree
Showing 10 changed files with 764 additions and 275 deletions.
8 changes: 4 additions & 4 deletions analogwp-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
* Plugin Name: Style Kits for Elementor
* Plugin URI: https://analogwp.com/
* 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.
* Version: 2.2.3
* Version: 2.3.0
* Author: AnalogWP
* Author URI: https://analogwp.com/
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: ang
* Requires at least: 6.0
* Requires PHP: 8.0
* Requires PHP: 7.4
*
* Elementor tested up to: 3.25.10
* Elementor Pro tested up to: 3.25.4
Expand All @@ -26,9 +26,9 @@
defined( 'ABSPATH' ) || exit;

define( 'ANG_ELEMENTOR_MINIMUM', '3.20.0' );
define( 'ANG_PHP_MINIMUM', '8.0' );
define( 'ANG_PHP_MINIMUM', '7.4' );
define( 'ANG_WP_MINIMUM', '6.0' );
define( 'ANG_VERSION', '2.2.2' );
define( 'ANG_VERSION', '2.3.0' );
define( 'ANG_PLUGIN_FILE', __FILE__ );
define( 'ANG_PLUGIN_URL', plugin_dir_url( ANG_PLUGIN_FILE ) );
define( 'ANG_PLUGIN_DIR', plugin_dir_path( ANG_PLUGIN_FILE ) );
Expand Down
17 changes: 0 additions & 17 deletions assets/css/sk-components.css
Original file line number Diff line number Diff line change
Expand Up @@ -1156,23 +1156,6 @@
/**
* Legacy features
*/

.elementor-control.elementor-control-ang_buttons {
margin-top: 40px;
}

.elementor-control.elementor-control-ang_buttons::before {
content: " ";
width: 100%;
height: 1px;
display: block;
background: #000;
opacity: 0.1;
top: -20px;
position: absolute;
}

.elementor-control.elementor-control-ang_buttons .elementor-control-content::after,
.elementor-control.elementor-control-ang_section_padding .elementor-control-content::after,
.elementor-control.elementor-control-ang_column_gaps .elementor-control-content::after,
.elementor-control.elementor-control-ang_colors .elementor-control-content::after {
Expand Down
36 changes: 0 additions & 36 deletions assets/js/admin-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,6 @@
const { __ } = wp.i18n;
const { addQueryArgs } = wp.url;

// Process Newsletter.
function processNewsletter( e ) {
if ( e.preventDefault ) {
e.preventDefault();
}
const elSubmitBtn = $( '#ang-newsletter-submit' );
let status = __( 'Subscribing', 'ang' );
const angEmail = $( '#ang-newsletter-email' ).val();
elSubmitBtn.text( status );

$.ajax( {
url: 'https://analogwp.com/?ang-api=asdf&request=subscribe_newsletter',
cache: ! 1,
type: 'POST',
dataType: 'JSON',
data: {
email: angEmail,
},
error: function() {
status = __( 'Failed', 'ang' );
elSubmitBtn.text( status );
setTimeout( function() {
elSubmitBtn.text( __( 'Subscribe up to newsletter', 'ang' ) );
}, 2000 );
},
success: function() {
status = __( 'Subscribed', 'ang' );
elSubmitBtn.text( status );
elSubmitBtn.attr( 'disabled', 'disabled' );
},
} );

return false;
}
$( '#ang-newsletter' ).submit( processNewsletter );

// Process Plugin Rollback.
function processPluginRollback( e ) {
if ( e.preventDefault ) {
Expand Down
3 changes: 1 addition & 2 deletions inc/class-elementor.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ public function enqueue_editor_scripts() {
if ( $is_legacy_hidden ) {
wp_add_inline_style(
'analogwp-components-css',
'.elementor-control.elementor-control-ang_buttons,
.elementor-control.elementor-control-ang_section_padding,
'.elementor-control.elementor-control-ang_section_padding,
.elementor-control.elementor-control-ang_column_gaps,
.elementor-control.elementor-control-ang_colors {
display: none !important;
Expand Down
33 changes: 26 additions & 7 deletions inc/elementor/class-typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ public function __construct() {

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

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

Expand All @@ -104,9 +104,7 @@ public function __construct() {

add_action( 'elementor/element/heading/section_title/after_section_end', array( $this, 'add_typo_helper_link' ), 999, 2 );

if ( Utils::is_elementor_pre( '3.20.0' ) ) {
add_action( 'elementor/element/button/section_button/after_section_end', array( $this, 'add_btn_sizes_helper_link' ), 999, 2 );
}
add_action( 'elementor/element/button/section_button/after_section_end', array( $this, 'add_btn_sizes_helper_link' ), 999, 2 );

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

Expand Down Expand Up @@ -822,8 +820,7 @@ public function register_buttons( Controls_Stack $element, $section_id ) {
'ang_buttons_description',
array(
'raw' => sprintf(
'%1$s<br/>%2$s <a href="%3$s" target="_blank">%4$s</a>',
__( 'Heads-up! This is a legacy feature, no longer supported in Elementor.', 'ang' ),
'%1$s <a href="%2$s" target="_blank">%3$s</a>',
__( 'Define the default styles for every button size.', 'ang' ),
'https://analogwp.com/docs/button-sizes/',
__( 'Learn more.', 'ang' )
Expand Down Expand Up @@ -2413,6 +2410,17 @@ public function tweak_container_borders( Element_Base $element ) {
* @param Element_Base $element Element_Base Class.
*/
public function add_typo_helper_link( Element_Base $element ) {
// Check and reset the condition to none at size control.
$size_control = $element->get_controls( 'size' );
if ( $size_control ) {
$element->update_control(
'size',
[
'condition' => [],
]
);
};

$element->start_injection(
array(
'of' => 'size',
Expand Down Expand Up @@ -2442,6 +2450,17 @@ public function add_typo_helper_link( Element_Base $element ) {
* @param Element_Base $element Element_Base Class.
*/
public function add_btn_sizes_helper_link( Element_Base $element ) {
// Check and reset the condition to none at size control.
$size_control = $element->get_controls( 'size' );
if ( $size_control ) {
$element->update_control(
'size',
[
'condition' => [],
]
);
};

$element->start_injection(
array(
'of' => 'size',
Expand Down
9 changes: 0 additions & 9 deletions inc/settings/views/html-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,6 @@
<a href="<?php echo esc_url( 'https://analogwp.com/docs/' ); ?>" target="_blank"><?php esc_html_e( 'Visit the online docs', 'ang' ); ?></a>
</p>
</div>
<div class="newsletter-list">
<h3><?php esc_html_e( 'Sign up for email updates', 'ang' ); ?></h3>
<p><?php esc_html_e( 'Stay in the loop with Style Kits development by signing up to our newsletter.', 'ang' ); ?></p>
<form id="ang-newsletter" action="" class="form-newsletter">
<input id="ang-newsletter-email" type="email" placeholder="Enter your email" value="<?php echo esc_attr( $current_user->user_email ); ?>"/>
<button id="ang-newsletter-submit" class="ang-button button-primary" type="submit"><?php esc_html_e( 'Sign me up', 'ang' ); ?></button>
</form>
<p><?php esc_html_e( 'By signing up you agree to our', 'ang' ); ?> <a href="<?php echo esc_url( 'https://analogwp.com/privacy-policy/' ); ?>" target="_blank"><?php esc_html_e( 'privacy and terms', 'ang' ); ?></a></p>
</div>
<div class="social">
<a href="https://facebook.com/analogwp" target="_blank"><span class="dashicons dashicons-facebook-alt"></span></a>
<a href="https://twitter.com/analogwp" target="_blank"><span class="dashicons dashicons-twitter"></span></a>
Expand Down
2 changes: 1 addition & 1 deletion languages/ang-analogwp-app.json

Large diffs are not rendered by default.

Loading

0 comments on commit d4078a1

Please sign in to comment.