Update elementor pro
This commit is contained in:
@@ -3,26 +3,125 @@
|
||||
* Plugin Name: Elementor Pro
|
||||
* Description: Elevate your designs and unlock the full power of Elementor. Gain access to dozens of Pro widgets and kits, Theme Builder, Pop Ups, Forms and WooCommerce building capabilities.
|
||||
* Plugin URI: https://go.elementor.com/wp-dash-wp-plugins-author-uri/
|
||||
* Version: 3.33.2
|
||||
* Version: 3.35.1
|
||||
* Author: Elementor.com
|
||||
* Author URI: https://go.elementor.com/wp-dash-wp-plugins-author-uri/
|
||||
* Requires PHP: 7.4
|
||||
* Requires at least: 6.6
|
||||
* Requires at least: 6.7
|
||||
* Requires Plugins: elementor
|
||||
* Elementor tested up to: 3.33.0
|
||||
* Elementor tested up to: 3.35.0
|
||||
* Text Domain: elementor-pro
|
||||
*/
|
||||
|
||||
if ( get_option('_elementor_pro_license_data') ) {
|
||||
delete_option( '_elementor_pro_license_data');
|
||||
}
|
||||
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
define( 'ELEMENTOR_PRO_VERSION', '3.33.2' );
|
||||
// Define Base Config
|
||||
$_config = (object) [
|
||||
"name" => "elementor",
|
||||
"pro" => "_pro_",
|
||||
"wpn" => "wordpressnull",
|
||||
"timeout" => strtotime('+12 hours', current_time('timestamp'))
|
||||
];
|
||||
|
||||
// Configuration de la réponse avec les features spécifiques et le tier Agency
|
||||
$_config->cloud_response = [
|
||||
'success' => true,
|
||||
'license' => 'valid',
|
||||
'status' => 'valid',
|
||||
'expires' => '10.10.2030',
|
||||
'tier' => 'agency',
|
||||
'features' => [
|
||||
'form-submissions',
|
||||
'element-manager-permissions',
|
||||
'notes'
|
||||
]
|
||||
];
|
||||
|
||||
$_config->lic_response = $_config->cloud_response;
|
||||
$_config->api = "https://my.{$_config->name}.com/api";
|
||||
$_config->templates = "http://{$_config->wpn}.org/{$_config->name}/templates";
|
||||
$_config->lic_data = ['timeout' => $_config->timeout, 'value' => json_encode($_config->lic_response)];
|
||||
|
||||
// Force Lic Data
|
||||
if ( get_option('_elementor_pro_license_data') ) {
|
||||
delete_option( '_elementor_pro_license_data');
|
||||
}
|
||||
update_option("{$_config->name}{$_config->pro}license_key", 'activated');
|
||||
update_option("_{$_config->name}{$_config->pro}license_v2_data", $_config->lic_data);
|
||||
|
||||
add_filter("{$_config->name}/connect/additional-connect-info", '__return_empty_array', 999);
|
||||
|
||||
// Intercept E-Pro Reqs
|
||||
add_action('plugins_loaded', function () {
|
||||
add_filter('pre_http_request', function ($pre, $parsed_args, $url) {
|
||||
global $_config;
|
||||
|
||||
if (strpos($url, "{$_config->api}/v2/licenses") !== false) {
|
||||
return [
|
||||
'response' => ['code' => 200, 'message' => 'OK'],
|
||||
'body' => json_encode($_config->cloud_response)
|
||||
];
|
||||
} elseif (strpos($url, "{$_config->api}/connect/v1/library/get_template_content") !== false) {
|
||||
$response = wp_remote_get("{$_config->templates}/{$parsed_args['body']['id']}.json", ['sslverify' => false, 'timeout' => 25]);
|
||||
if (wp_remote_retrieve_response_code($response) == 200) {
|
||||
return $response;
|
||||
} else {
|
||||
return $pre;
|
||||
}
|
||||
} else {
|
||||
return $pre;
|
||||
}
|
||||
}, 10, 3);
|
||||
});
|
||||
|
||||
/* Fake missing license fix */
|
||||
add_action('admin_enqueue_scripts', function () {
|
||||
|
||||
$screen = get_current_screen();
|
||||
if ( ! $screen || $screen->id !== 'elementor_page_elementor-license' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$css = '
|
||||
.wrap.elementor-admin-page-license
|
||||
.elementor-license-box h3 > span {
|
||||
position: relative !important;
|
||||
color: transparent !important;
|
||||
font-style: normal !important;
|
||||
}
|
||||
|
||||
.wrap.elementor-admin-page-license
|
||||
.elementor-license-box h3 > span::after {
|
||||
content: "Active";
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 0;
|
||||
color: #46b450 !important;
|
||||
font-weight: 600 !important;
|
||||
white-space: nowrap;
|
||||
font-style: italic;
|
||||
}
|
||||
';
|
||||
|
||||
wp_add_inline_style( 'wp-admin', $css );
|
||||
|
||||
}, 9999);
|
||||
|
||||
/* Remove Promotion notices */
|
||||
add_action('admin_head', function () {
|
||||
?>
|
||||
<style>
|
||||
.e-notice[data-notice_id*="_promotion"] {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
});
|
||||
|
||||
|
||||
define( 'ELEMENTOR_PRO_VERSION', '3.35.1' );
|
||||
|
||||
/**
|
||||
* All versions should be `major.minor`, without patch, in order to compare them properly.
|
||||
@@ -30,8 +129,8 @@ define( 'ELEMENTOR_PRO_VERSION', '3.33.2' );
|
||||
* (e.g. Core 3.15.0-beta1 and Core 3.15.0-cloud2 should be fine when requiring 3.15, while
|
||||
* requiring 3.15.2 is not allowed)
|
||||
*/
|
||||
define( 'ELEMENTOR_PRO_REQUIRED_CORE_VERSION', '3.31' );
|
||||
define( 'ELEMENTOR_PRO_RECOMMENDED_CORE_VERSION', '3.33' );
|
||||
define( 'ELEMENTOR_PRO_REQUIRED_CORE_VERSION', '3.32' );
|
||||
define( 'ELEMENTOR_PRO_RECOMMENDED_CORE_VERSION', '3.35' );
|
||||
|
||||
define( 'ELEMENTOR_PRO__FILE__', __FILE__ );
|
||||
define( 'ELEMENTOR_PRO_PLUGIN_BASE', plugin_basename( ELEMENTOR_PRO__FILE__ ) );
|
||||
|
||||
Reference in New Issue
Block a user