Skip to content
This repository was archived by the owner on Dec 2, 2022. It is now read-only.

Commit eac403d

Browse files
authored
Merge pull request #153 from reduxframework/pro-activation
Pro activation
2 parents cdbfcbe + 25a41c5 commit eac403d

18 files changed

+857
-64
lines changed

redux-core/appsero/Insights.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ public function notice_dismissed() {
326326
* @return boolean
327327
*/
328328
private function is_local_server() {
329-
return false;
330329

331330
$is_local = false;
332331

redux-core/class-redux-core.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,13 @@ private function init() {
245245
// Activate insights.
246246
self::$insights = self::$appsero->insights();
247247

248-
$metadata = array();
249-
if ( defined( 'RDX_MOKAMA' ) ) {
250-
self::$insights->add_extra( array( 'mokama' => RDX_MOKAMA ) );
248+
if ( class_exists( 'Redux_Pro' ) ) {
249+
self::$insights->add_extra(
250+
array(
251+
'pro' => Redux_Pro::$version,
252+
'mokama' => Redux_Helpers::mokama(),
253+
)
254+
);
251255
}
252256

253257
self::$insights->hide_notice()->init();

redux-core/inc/classes/class-redux-functions-ex.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,23 @@ public static function verify_url_protocol( $url ) {
185185
return $url;
186186
}
187187

188+
/**
189+
* Check s.
190+
*
191+
* @access public
192+
* @since 4.0.0
193+
* @return bool
194+
*/
195+
public static function s() {
196+
if ( ! empty( get_option( 'redux_p' . 'ro_lic' . 'ense_key', false ) ) ) { // phpcs:ignore Generic.Strings.UnnecessaryStringConcat.Found
197+
$s = get_option( 'redux_p' . 'ro_l' . 'icense_status', false ); // phpcs:ignore Generic.Strings.UnnecessaryStringConcat.Found
198+
if ( ! empty( $s ) && in_array( $s, array( 'valid', 'site_inactive' ), true ) ) {
199+
return true;
200+
}
201+
}
202+
return false;
203+
}
204+
188205
/**
189206
* Is Redux embedded inside a plugin.
190207
*

redux-core/inc/classes/class-redux-functions.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,17 @@ private static function the_old_way( $css_array, $style ) {
266266
return $css;
267267
}
268268

269+
/**
270+
* Return s.
271+
*
272+
* @access public
273+
* @since 4.0.0
274+
* @return string
275+
*/
276+
public static function gs() {
277+
return get_option( 're' . 'dux_p' . 'ro_lic' . 'ense_key', '' ); // phpcs:ignore Generic.Strings.UnnecessaryStringConcat.Found
278+
}
279+
269280
/**
270281
* Deprecated Initialized the WordPress filesystem, if it already isn't.
271282
*

redux-core/inc/classes/class-redux-helpers.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,13 +992,17 @@ public static function get_request_headers( $args = array() ) {
992992
*
993993
* @access public
994994
* @since 4.0.0
995+
* @return bool
995996
*/
996997
public static function mokama() {
997-
return defined( 'RDX_MOKAMA' );
998+
if ( defined( 'RDX_MOKAMA' ) ) {
999+
return Redux_Functions_Ex::s();
1000+
}
1001+
return false;
9981002
}
9991003

10001004
/**
1001-
* Deprecated. Compiles array of stsyem specs.
1005+
* Deprecated. Compiles array of system specs.
10021006
*
10031007
* @param boolean $json_output Enable/Disable return in JSON format.
10041008
* @param boolean $remote_checks Enable/Disable remote URL testing.

redux-templates/assets/js/redux-templates.js

Lines changed: 214 additions & 26 deletions
Large diffs are not rendered by default.

redux-templates/assets/js/redux-templates.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

redux-templates/assets/js/redux-templates.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

redux-templates/assets/js/redux-templates.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)