Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/jeg-elementor-kit/class/class-init.php
+++ b/jeg-elementor-kit/class/class-init.php
@@ -61,7 +61,8 @@
* Setup Hooks
*/
private function setup_hook() {
- // add_action( 'load-plugins.php', array( $this, 'replace_plugin_update_row' ), 99 );
+ add_action( 'load-plugins.php', array( $this, 'replace_plugin_update_row' ), 99 );
+ add_action( 'current_screen', array( $this, 'maybe_replace_plugin_update_row' ), 20 );
add_filter( 'plugin_action_links_' . JEG_ELEMENTOR_KIT_BASE, array( $this, 'add_upgrade_to_pro_action_link' ), 10, 4 );
add_filter( 'body_class', array( $this, 'load_body_class' ) );
add_filter( 'plugin_auto_update_setting_html', array( $this, 'disable_auto_update_setting_html' ), 10, 3 );
@@ -86,10 +87,25 @@
*/
public function replace_plugin_update_row() {
remove_action( 'after_plugin_row_' . JEG_ELEMENTOR_KIT_BASE, 'wp_plugin_update_row' );
+ remove_action( 'after_plugin_row_' . JEG_ELEMENTOR_KIT_BASE, 'jkit_plugin_update_row', 10 );
add_action( 'after_plugin_row_' . JEG_ELEMENTOR_KIT_BASE, 'jkit_plugin_update_row', 10, 2 );
}
/**
+ * Ensure custom plugin update row is used on the Plugins screen, including search results.
+ *
+ * @param WP_Screen $screen Current screen instance.
+ * @return void
+ */
+ public function maybe_replace_plugin_update_row( $screen ) {
+ if ( ! isset( $screen->id ) || ! in_array( $screen->id, array( 'plugins', 'plugins-network' ), true ) ) {
+ return;
+ }
+
+ $this->replace_plugin_update_row();
+ }
+
+ /**
* Add body class
*
* @param array $classes Body classes.
--- a/jeg-elementor-kit/class/elements/class-element.php
+++ b/jeg-elementor-kit/class/elements/class-element.php
@@ -110,6 +110,10 @@
* @param ElementorWidgets_Manager $manager Elementor widgets manager.
*/
public function register_element_pro( $manager ) {
+ if ( ! class_exists( 'ElementorModulesPromotionsWidgetsPro_Widget_Promotion' ) ) {
+ return;
+ }
+
foreach ( $this->list_pro_elements() as $item => $data ) {
$item_key = 'jkit_pro_' . strtolower( $item );
--- a/jeg-elementor-kit/class/integrations/class-wpml.php
+++ b/jeg-elementor-kit/class/integrations/class-wpml.php
@@ -295,6 +295,15 @@
),
);
+ /** Jeg Kit - Post Date Widget */
+ $widgets['jkit_post_date'] = array(
+ 'conditions' => array( 'widgetType' => 'jkit_post_date' ),
+ 'fields' => array(
+ $this->field( 'sg_date_format_custom', __( 'Jeg Kit Post Date: Date: Custom Format', 'jeg-elementor-kit' ) ),
+ 'sg_date_link_to_custom' => $this->field( 'url', __( 'Jeg Kit Post Date: Date: Custom Link', 'jeg-elementor-kit' ), 'LINK' ),
+ ),
+ );
+
return $widgets;
}
--- a/jeg-elementor-kit/class/templates/class-template.php
+++ b/jeg-elementor-kit/class/templates/class-template.php
@@ -276,10 +276,13 @@
public function check_conditions( $post_id, $header_id ) {
$flag = true;
$conditions = get_post_meta( $header_id, Dashboard::$jkit_condition, true );
- $conditions = maybe_unserialize( $conditions );
- if ( $conditions ) {
+ if ( is_array( $conditions ) ) {
foreach ( $conditions as $condition ) {
+ if ( ! is_array( $condition ) || empty( $condition['location'] ) ) {
+ continue;
+ }
+
switch ( $condition['location'] ) {
case 'singular':
case 'post_single':
--- a/jeg-elementor-kit/helper.php
+++ b/jeg-elementor-kit/helper.php
@@ -1891,6 +1891,10 @@
$requires_php = isset( $response->requires_php ) ? $response->requires_php : null;
$compatible_php = is_php_version_compatible( $requires_php );
$notice_type = $compatible_php ? 'notice-warning' : 'notice-error';
+ $free_update_url = wp_nonce_url(
+ self_admin_url( 'update.php?action=upgrade-plugin&plugin=' . rawurlencode( $file ) ),
+ 'upgrade-plugin_' . $file
+ );
printf(
'<tr class="plugin-update-tr%s" id="%s" data-slug="%s" data-plugin="%s">' .
@@ -1933,8 +1937,8 @@
} else {
if ( $compatible_php ) {
printf(
- /* translators: 1: Update URL, 2: Additional update link attributes, 3: Upgrade URL. */
- __( 'There is a new version of %1$s available. <strong><a href="%2$s" target="_blank" rel="noopener noreferrer" %3$s>Upgrade to Pro</a></strong> to unlock automatic updates, premium features, widgets, templates, and priority support or <strong><a href="%4$s" target="_blank" rel="noopener noreferrer">download</a></strong> the latest version.', 'jeg-elementor-kit' ),
+ /* translators: 1: Plugin name, 2: Upgrade URL, 3: Additional upgrade link attributes, 4: Pricing URL, 5: Free update URL, 6: Free update label. */
+ __( 'A new version of %1$s is available. <strong><a href="%2$s" target="_blank" rel="noopener noreferrer" %3$s>Upgrade to Pro</a></strong> to unlock automatic updates, premium features, widgets, templates, and priority support, or <strong><a href="%4$s" target="_blank" rel="noopener noreferrer" class="jkit-update-now-pricing" data-continue-url="%5$s" data-continue-label="%6$s">update now</a></strong>.', 'jeg-elementor-kit' ),
esc_html( $plugin_name ),
esc_url(
add_query_arg(
@@ -1951,7 +1955,18 @@
/* translators: %s: Plugin name. */
esc_attr( sprintf( _x( 'Upgrade %s now', 'plugin' ), $plugin_name ) )
),
- esc_url( $plugin_data['url'] )
+ esc_url(
+ add_query_arg(
+ array(
+ 'page' => 'jkit',
+ 'utm_source' => 'plugin-update-notice',
+ 'utm_medium' => 'plugin-update-now-link',
+ ),
+ admin_url( 'admin.php' )
+ )
+ ),
+ esc_url( $free_update_url ),
+ esc_attr__( 'Continue Free Update', 'jeg-elementor-kit' )
);
} else {
printf(
--- a/jeg-elementor-kit/jeg-elementor-kit.php
+++ b/jeg-elementor-kit/jeg-elementor-kit.php
@@ -4,7 +4,7 @@
* Plugin URI: https://jegkit.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
* Description: Jeg Kit for Elementor (formerly Jeg Elementor Kit) extends Elementor with powerful, customizable widgets and templates — helping you build modern, responsive WordPress websites faster.
* Requires Plugins: elementor
- * Version: 3.2.10
+ * Version: 3.2.11
* Author: Jegtheme
* Author URI: https://jegkit.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
* License: GPLv3
@@ -20,7 +20,7 @@
defined( 'JEG_ELEMENTOR_KIT' ) || define( 'JEG_ELEMENTOR_KIT', 'jeg-elementor-kit' );
defined( 'JEG_ELEMENTOR_KIT_NAME' ) || define( 'JEG_ELEMENTOR_KIT_NAME', 'Jeg Kit' );
-defined( 'JEG_ELEMENTOR_KIT_VERSION' ) || define( 'JEG_ELEMENTOR_KIT_VERSION', '3.2.10' );
+defined( 'JEG_ELEMENTOR_KIT_VERSION' ) || define( 'JEG_ELEMENTOR_KIT_VERSION', '3.2.11' );
defined( 'JEG_ELEMENTOR_KIT_URL' ) || define( 'JEG_ELEMENTOR_KIT_URL', plugins_url( JEG_ELEMENTOR_KIT ) );
defined( 'JEG_ELEMENTOR_KIT_FILE' ) || define( 'JEG_ELEMENTOR_KIT_FILE', __FILE__ );
defined( 'JEG_ELEMENTOR_KIT_BASE' ) || define( 'JEG_ELEMENTOR_KIT_BASE', plugin_basename( __FILE__ ) );
--- a/jeg-elementor-kit/lib/dependencies/admin.asset.php
+++ b/jeg-elementor-kit/lib/dependencies/admin.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react-dom', 'regenerator-runtime', 'wp-element', 'wp-i18n'), 'version' => '2f68ad1a903823e64077');
+<?php return array('dependencies' => array('react-dom', 'regenerator-runtime', 'wp-element', 'wp-i18n'), 'version' => '5f12926fd60f638cffbc');
--- a/jeg-elementor-kit/lib/dependencies/core.asset.php
+++ b/jeg-elementor-kit/lib/dependencies/core.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '2c6e73dfb9654e9a4fb5');
+<?php return array('dependencies' => array('react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '9351ef79d726194bb7e1');
--- a/jeg-elementor-kit/lib/dependencies/dashboard.asset.php
+++ b/jeg-elementor-kit/lib/dependencies/dashboard.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'edf6a355d59f8d94514b');
+<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '69f532429fda8f147919');
--- a/jeg-elementor-kit/lib/dependencies/editor.asset.php
+++ b/jeg-elementor-kit/lib/dependencies/editor.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react-dom', 'regenerator-runtime', 'wp-element', 'wp-i18n'), 'version' => 'b59bc95cb1f1aaa7925d');
+<?php return array('dependencies' => array('react-dom', 'regenerator-runtime', 'wp-element', 'wp-i18n'), 'version' => '6b87adb03c9c21e66799');
--- a/jeg-elementor-kit/lib/dependencies/wizard.asset.php
+++ b/jeg-elementor-kit/lib/dependencies/wizard.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '6276de09ad4d35fcc66f');
+<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '761892342a9c35be05f5');
--- a/jeg-elementor-kit/lib/vendor/composer/installed.php
+++ b/jeg-elementor-kit/lib/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => 'jegstudio/jeg-elementor-kit',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => '83b5c46aaf4e97397344eb4e020b011c55b27a06',
+ 'reference' => '3c78de62fbff5de966bc731042a0d37365444cfd',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -31,7 +31,7 @@
'jegstudio/jeg-elementor-kit' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => '83b5c46aaf4e97397344eb4e020b011c55b27a06',
+ 'reference' => '3c78de62fbff5de966bc731042a0d37365444cfd',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
--- a/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/includes/class-fs-api.php
+++ b/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/includes/class-fs-api.php
@@ -721,4 +721,4 @@
}
#endregion
- }
+ }
No newline at end of file
--- a/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/includes/sdk/FreemiusBase.php
+++ b/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/includes/sdk/FreemiusBase.php
@@ -214,4 +214,4 @@
return $str;
}
}
- }
+ }
No newline at end of file
--- a/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/templates/account/partials/site.php
+++ b/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/templates/account/partials/site.php
@@ -351,4 +351,4 @@
</td>
</tr>
<!--/ More details -->
-<?php endif ?>
+<?php endif ?>
No newline at end of file
--- a/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/templates/connect.php
+++ b/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/templates/connect.php
@@ -1059,4 +1059,4 @@
})(jQuery);
</script>
<?php
- fs_require_once_template( 'api-connectivity-message-js.php' );
+ fs_require_once_template( 'api-connectivity-message-js.php' );
No newline at end of file
--- a/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/templates/connect/permissions-group.php
+++ b/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/templates/connect/permissions-group.php
@@ -69,4 +69,4 @@
}
?>
</ul>
-</div>
+</div>
No newline at end of file
--- a/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/templates/js/permissions.php
+++ b/jeg-elementor-kit/lib/vendor/freemius/wordpress-sdk/templates/js/permissions.php
@@ -543,4 +543,4 @@
};
} )( jQuery );
-</script>
+</script>
No newline at end of file