Skip to content

Commit

Permalink
Merge pull request #4 from eduardovillao/wp-6.5-compatibility
Browse files Browse the repository at this point in the history
Support to wp 6.5
  • Loading branch information
eduardovillao authored Apr 7, 2024
2 parents 9099eeb + 775ac0d commit eed630c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
14 changes: 4 additions & 10 deletions add-class-to-elementor-image.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Description: Simple plugin to add custom CSS class to Elementor image.
* Author: EduardoVillao.me
* Author URI: https://eduardovillao.me/
* Version: 1.3
* Requires at least: 5.4
* Version: 1.3.1
* Requires at least: 5.5
* Requires PHP: 7.0
* Text Domain: add-class-to-elementor-image
* License: GPL-2.0+
Expand Down Expand Up @@ -81,8 +81,7 @@ public static function instance() {
* @since 1.6
*/
public function __clone() {
// Cloning instances of the class is forbidden.
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'add-class-to-elementor-image' ), '1.3' );
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'add-class-to-elementor-image' ), '1.3.1' );
}

/**
Expand All @@ -92,8 +91,7 @@ public function __clone() {
* @since 1.6
*/
public function __wakeup() {
// Unserializing instances of the class is forbidden.
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'add-class-to-elementor-image' ), '1.3' );
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'add-class-to-elementor-image' ), '1.3.1' );
}

/**
Expand All @@ -106,7 +104,6 @@ public function __wakeup() {
* @access private
*/
private function __construct() {

add_action( 'plugins_loaded', [ $this, 'add_elementor_mod' ] );
}

Expand All @@ -120,7 +117,6 @@ private function __construct() {
* @access public
*/
public function add_elementor_mod() {

if ( ! did_action( 'elementor/loaded' ) ) {
return;
}
Expand All @@ -141,7 +137,6 @@ public function add_elementor_mod() {
* @access public
*/
public function add_elementor_pro_mod() {

if ( ! did_action( 'elementor_pro/init' ) ) {
return;
}
Expand All @@ -159,7 +154,6 @@ public function add_elementor_pro_mod() {
* @access public
*/
public function add_class_control( $image, $args) {

$image->add_control(
'cei_image_custom_class',
[
Expand Down
20 changes: 12 additions & 8 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: EVCODE
Donate link: https://eduardovillao.me/
Tags: elementor, custom class, elementor pro, image class, lazy load
Requires at least: 5.4
Tested up to: 6.3
Stable tag: 1.3
Requires at least: 5.5
Tested up to: 6.5
Stable tag: 1.3.1
Requires PHP: 7.0
License: GPLv2License
URI:https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -43,18 +43,22 @@ Please, send to me: [[email protected]](mailto:[email protected])

== Changelog ==

= 1.3.1 =
* Changed: compatibility with WordPress 6.5.
* Changed: code improvements.

= 1.3 =
Fix: do not workin on the latest versions of Elementor.
Changed: Compatibility with WordPress 6.3.
* Fix: do not working on the latest versions of Elementor.
* Changed: Compatibility with WordPress 6.3.

= 1.2.4 =
Changed: Compatibility with WordPress 6.2.
* Changed: Compatibility with WordPress 6.2.

= 1.2.3 =
Changed: Compatibility with WordPress 6.1.
* Changed: Compatibility with WordPress 6.1.

= 1.2.2 =
Changed: Compatibility with WordPress 6.0.
* Changed: Compatibility with WordPress 6.0.

= 1.2.1 =
* Fix php notice "Undefined index: cei_image_custom_class" in some cases.
Expand Down

0 comments on commit eed630c

Please sign in to comment.