plugin updates
This commit is contained in:
@@ -493,9 +493,6 @@ function get_theme_feature_list( $api = true ) {
|
||||
* for more information on the make-up of possible return objects depending on the value of `$action`.
|
||||
*/
|
||||
function themes_api( $action, $args = array() ) {
|
||||
// Include an unmodified $wp_version.
|
||||
require ABSPATH . WPINC . '/version.php';
|
||||
|
||||
if ( is_array( $args ) ) {
|
||||
$args = (object) $args;
|
||||
}
|
||||
@@ -511,7 +508,7 @@ function themes_api( $action, $args = array() ) {
|
||||
}
|
||||
|
||||
if ( ! isset( $args->wp_version ) ) {
|
||||
$args->wp_version = substr( $wp_version, 0, 3 ); // x.y
|
||||
$args->wp_version = substr( wp_get_wp_version(), 0, 3 ); // x.y
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -562,7 +559,7 @@ function themes_api( $action, $args = array() ) {
|
||||
|
||||
$http_args = array(
|
||||
'timeout' => 15,
|
||||
'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ),
|
||||
'user-agent' => 'WordPress/' . wp_get_wp_version() . '; ' . home_url( '/' ),
|
||||
);
|
||||
$request = wp_remote_get( $url, $http_args );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user