Skip to content
Snippets Groups Projects
Commit 7c139690 authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

Merge branch 'feature/wp-nonce' into 'master'

Feature/wp nonce

See merge request !17
parents 167246cc b9ad68ab
No related branches found
No related tags found
1 merge request!17Feature/wp nonce
Pipeline #9259 passed with stages
in 51 seconds
## [3.0.5] - 2019-09-20
### Fixed
- Fixed missing wp_create_nonce function
## [3.0.4] - 2019-09-20
### Fixed
- Fixed missing wp_nonce_url function
......
......@@ -312,7 +312,7 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
private function prepare_plugin_repository_install_url( $plugin_info ) {
$slug = basename( $plugin_info[ self::PLUGIN_INFO_KEY_NAME ] );
$install_url = self_admin_url( 'update.php?action=install-plugin&plugin=' . $slug );
if ( function_exists( 'wp_nonce_url' ) ) {
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 ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment