Skip to content

Commit

Permalink
Merge pull request #207 from Yoast/JRF/various-small-bug-fixes
Browse files Browse the repository at this point in the history
Various small bug fixes
  • Loading branch information
enricobattocchi authored Nov 25, 2023
2 parents fc3fd33 + 395d8bf commit 4cc6437
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/admin-notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ] );
}

Expand Down
2 changes: 1 addition & 1 deletion src/admin-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
2 changes: 1 addition & 1 deletion src/downgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/feature-toggler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 3 additions & 1 deletion src/plugin-toggler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

/**
Expand Down Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 4cc6437

Please sign in to comment.