diff --git a/extensions/premium/local/trunk/inc/traits/secure-post.trait.php b/extensions/premium/local/trunk/inc/traits/secure-post.trait.php index 656330a6..2ca4471c 100644 --- a/extensions/premium/local/trunk/inc/traits/secure-post.trait.php +++ b/extensions/premium/local/trunk/inc/traits/secure-post.trait.php @@ -82,8 +82,8 @@ protected function set_nonces() { */ protected function init_post_checks() { - //* Update POST listener. - \add_action( 'admin_init', [ $this, '_handle_update_post' ] ); + // AJAX only, not registered. Also, this method AFTER admin_init, so it went by unnoticed. + // \add_action( 'admin_init', [ $this, '_handle_update_post' ] ); if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { $this->init_ajax_post_checks(); diff --git a/extensions/premium/monitor/trunk/inc/classes/admin.class.php b/extensions/premium/monitor/trunk/inc/classes/admin.class.php index 7528efa5..43864228 100644 --- a/extensions/premium/monitor/trunk/inc/classes/admin.class.php +++ b/extensions/premium/monitor/trunk/inc/classes/admin.class.php @@ -360,7 +360,7 @@ final protected function handle_update_nonce( $key = 'default', $check_post = tr if ( isset( $validated[ $key ] ) ) return $validated[ $key ]; - if ( false === $this->is_monitor_page() && false === \tsf_extension_manager()->can_do_settings() ) + if ( ! \tsf_extension_manager()->can_do_settings() ) return $validated[ $key ] = false; if ( $check_post ) { diff --git a/inc/classes/core.class.php b/inc/classes/core.class.php index 64df582e..11d175fb 100644 --- a/inc/classes/core.class.php +++ b/inc/classes/core.class.php @@ -1637,6 +1637,7 @@ final public function filter_keys( array $input, array $keys ) { * Determines whether we're on the SEO extension manager settings page. * * @since 1.0.0 + * @since 2.0.4 No longer caches invalid requests. * @staticvar bool $cache * * @param bool $secure Whether to prevent insecure checks. @@ -1654,7 +1655,12 @@ final public function is_tsf_extension_manager_page( $secure = true ) { if ( $secure ) { //* Don't load from $_GET request if secure. - return $cache = \the_seo_framework()->is_menu_page( $this->seo_extensions_menu_page_hook ); + if ( \did_action( 'current_screen' ) ) { + return $cache = \the_seo_framework()->is_menu_page( $this->seo_extensions_menu_page_hook ); + } else { + // current_screen isn't set up. + return false; + } } else { //* Don't cache if insecure. if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { diff --git a/inc/classes/loadadmin.class.php b/inc/classes/loadadmin.class.php index 80929ed8..e30a025a 100644 --- a/inc/classes/loadadmin.class.php +++ b/inc/classes/loadadmin.class.php @@ -520,7 +520,7 @@ final protected function handle_update_nonce( $key = 'default', $check_post = tr if ( isset( $validated[ $key ] ) ) return $validated[ $key ]; - if ( ! $this->is_tsf_extension_manager_page() || ! $this->can_do_settings() ) + if ( ! $this->can_do_settings() ) return $validated[ $key ] = false; if ( $check_post ) { diff --git a/readme.txt b/readme.txt index 01441156..f4fe75e2 100644 --- a/readme.txt +++ b/readme.txt @@ -168,6 +168,16 @@ If you were to get a plugin activation error, either open a support ticket [here == Changelog == += 2.0.4 = + +**Release date:** + +* January 29th, 2019 + +**Plugin Improvements:** + +* **Fixed:** Settings that don't use AJAX can now be processed again, like for activating or deactivating your license key. + = 2.0.3 = **Release date:** diff --git a/the-seo-framework-extension-manager.php b/the-seo-framework-extension-manager.php index a736711d..617c35b8 100644 --- a/the-seo-framework-extension-manager.php +++ b/the-seo-framework-extension-manager.php @@ -3,7 +3,7 @@ * Plugin Name: The SEO Framework - Extension Manager * Plugin URI: https://theseoframework.com/extension-manager/ * Description: Add more powerful SEO features to The SEO Framework right from your WordPress Dashboard. - * Version: 2.0.3 + * Version: 2.0.4 * Author: Sybre Waaijer * Author URI: https://theseoframework.com/ * License: GPLv3 @@ -39,7 +39,7 @@ * The plugin version. Always 3 point. * @since 1.0.0 */ -define( 'TSF_EXTENSION_MANAGER_VERSION', '2.0.3' ); +define( 'TSF_EXTENSION_MANAGER_VERSION', '2.0.4' ); /** * The plugin's database version.