$url,
array
( 'timeout' => 2,
'httpversion' => '1.0',
) );
if ( is_wp_error( $response ) ) { return false;
} if ( wp_remote_retrieve_header( $response, 'X-Pingback'
) ) { return wp_remote_retrieve_header( $response, 'X-Pingback'
);
} // Not an (x)html, sgml, or xml page, no use going further.
if ( preg_match( '#(image|audio|video|model)/#is',
wp_remote_retrieve_header( $response, 'Content-Type'
) ) ) { return false;
} // Now do a GET since we're going to look in the HTML headers (and we're sure it's not a binary file).
$response =
wp_safe_remote_get( $url,