diff --git a/src/admin-notifications.php b/src/admin-notifications.php index db6c02c..4aaff16 100644 --- a/src/admin-notifications.php +++ b/src/admin-notifications.php @@ -20,7 +20,7 @@ class Admin_Notifications implements Integration { * @return void */ public function add_hooks() { - \add_action( 'Yoast\WP\Test_Helper\notification', [ $this, 'add_notification' ], 10, 2 ); + \add_action( 'Yoast\WP\Test_Helper\notification', [ $this, 'add_notification' ] ); \add_action( 'Yoast\WP\Test_Helper\notifications', [ $this, 'display_notifications' ] ); } diff --git a/src/admin-page.php b/src/admin-page.php index 12c486b..8087d53 100644 --- a/src/admin-page.php +++ b/src/admin-page.php @@ -44,7 +44,7 @@ public function add_assets() { \wp_enqueue_style( 'yoast-test-admin-style', \plugin_dir_url( \YOAST_TEST_HELPER_FILE ) . 'assets/css/admin.css', - null, + [], \YOAST_TEST_HELPER_VERSION ); \wp_enqueue_script( 'masonry' ); diff --git a/src/downgrader.php b/src/downgrader.php index e65d9ea..cc849f8 100644 --- a/src/downgrader.php +++ b/src/downgrader.php @@ -151,7 +151,7 @@ protected function downgrade( $target_version ) { $adapter->remove_version( $version ); $adapter->commit_transaction(); } catch ( Exception $e ) { - $this->adapter->rollback_transaction(); + $adapter->rollback_transaction(); throw new Exception( \sprintf( diff --git a/src/feature-toggler.php b/src/feature-toggler.php index 15fa9a4..3ad81d6 100644 --- a/src/feature-toggler.php +++ b/src/feature-toggler.php @@ -36,7 +36,7 @@ public function __construct( Option $option ) { * @return void */ public function add_hooks() { - \add_action( 'wpseo_enable_feature', [ $this, 'enable_features' ] ); + \add_filter( 'wpseo_enable_feature', [ $this, 'enable_features' ] ); \add_action( 'admin_post_yoast_seo_feature_toggler', diff --git a/src/plugin-toggler.php b/src/plugin-toggler.php index d5f268e..08d199e 100644 --- a/src/plugin-toggler.php +++ b/src/plugin-toggler.php @@ -394,7 +394,7 @@ private function activate_plugin( $group, $plugin ) { } $plugin_path = $this->plugin_groups[ $group ][ $plugin ]; - \activate_plugin( \plugin_basename( $plugin_path ), null, false, true ); + \activate_plugin( \plugin_basename( $plugin_path ), '', false, true ); } /** @@ -431,6 +431,8 @@ private function verify_nonce() { if ( isset( $_GET['ajax_nonce'] ) && \wp_verify_nonce( $_GET['ajax_nonce'], 'yoast-plugin-toggle' ) ) { return true; } + + return false; } /**