Skip to content
Snippets Groups Projects
Commit d2ed9a75 authored by Marcin Kolanko's avatar Marcin Kolanko
Browse files

Merge branch 'bugfix/wordpress-review' into 'master'

fix: remove of the plugin_api filter as prohibited for use in the plugin review.

See merge request !45
parents 08e34862 6a9e76e2
No related branches found
No related tags found
1 merge request!45fix: remove of the plugin_api filter as prohibited for use in the plugin review.
Pipeline #507720 passed
## [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 ## [3.6.3] - 2024-04-16
### Fixed ### Fixed
- Prevent error notice - Prevent error notice
......
...@@ -491,22 +491,6 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) { ...@@ -491,22 +491,6 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
if ( function_exists( 'wp_nonce_url' ) && function_exists( 'wp_create_nonce' ) ) { if ( function_exists( 'wp_nonce_url' ) && function_exists( 'wp_create_nonce' ) ) {
$install_url = wp_nonce_url( $install_url, 'install-plugin_' . $slug ); $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; return $install_url;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment