diff --git a/CHANGELOG.md b/CHANGELOG.md index 82415f6c52047b5f1aab1f60bb644a26ea0f2c62..decc6190f2e017e957fd3113272e1248511f1a2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [3.7.0] - 2025-05-16 +### Fixed +- Remove of the plugin_api filter as prohibited for use in the plugin review. + ## [3.6.3] - 2024-04-16 ### Fixed - Prevent error notice diff --git a/src/Basic_Requirement_Checker.php b/src/Basic_Requirement_Checker.php index 43a89819d66385a720cb75b73454fda06b7cae9a..d3309d976954e57993e99a2450251129be597363 100644 --- a/src/Basic_Requirement_Checker.php +++ b/src/Basic_Requirement_Checker.php @@ -491,22 +491,6 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) { if ( function_exists( 'wp_nonce_url' ) && function_exists( 'wp_create_nonce' ) ) { $install_url = wp_nonce_url( $install_url, 'install-plugin_' . $slug ); } - add_filter( 'plugins_api', function( $api, $action, $args ) use ( $plugin_info, $slug ) { - if ( 'plugin_information' !== $action || - false !== $api || - ! isset( $args->slug ) || - $slug !== $args->slug - ) { - return $api; - } - - $api = new stdClass(); - $api->name = $plugin_info['nice_name']; // self in closures requires 5.4 - $api->version = ''; - $api->download_link = esc_url( $plugin_info['repository_url'] ); // self in closures requires 5.4 - - return $api; - }, 10, 3 ); return $install_url; }