$request = wp_remote_post( 'http://api.wordpress.org/core/version-check/1.6/', array('body' => array('action' => 'version')));
if (!is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200) {
echo json_encode(unserialize($request['body']));
}
No comments:
Post a Comment