Daniele Scasciafratte / @Mte90Net
Source: wordpress.org/news/2019/05/jaco/, kinsta.com/it/blog/wordpress-5-2/
WordPress will now automatically determine if your site’s version of PHP is compatible with installed plugins. If the plugin requires a higher version of PHP than your site currently uses, WordPress will not allow you to activate it, preventing potential compatibility errors.
The minimum supported PHP version is now 5.6.20.
< body >
Ticket #39309 was opened in 2017 describing a security issue with the WordPress infrastructure. Basically, if someone was able to compromise api.wordpress.org, they could issue fake updates and take control of user’s WordPress sites. Therefore, as of WordPress 5.2, it now checks for the existence of a x-content-signature header. If one isn’t found, it falls back to a signature file. Regardless of the method, the update packages are now digitally signed using Ed25519 and are base64-encoded.
define( 'WP_DEBUG_LOG', 'path/to/log/file' );
WordPress 5.2 introduces new short circuit filters to WP_Site_Query and WP_Network_Query.
function myplugin_do_external_site_query( $sites, $site_query ) {
$response = wp_remote_get( 'https://my-remote-data-store/foo/bar' );
if ( 200 === wp_remote_response_code( $response ) ) {
$response = json_decode( wp_remote_retrieve_body( $response ) );
$sites = array_map( 'intval', $response->site_ids );
$query->found_sites = (int) $response->found_sites;
}
return $sites;
}
add_filter( 'sites_pre_query', 'myplugin_do_external_site_query', 10, 2 );