Embeds: Replace hardcoded error messages with `get_status_header_desc( $http_code )`.

Fixes #34275.
Built from https://develop.svn.wordpress.org/trunk@35408


git-svn-id: http://core.svn.wordpress.org/trunk@35372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2015-10-27 20:44:23 +00:00
parent 887dca222c
commit 80116f2136
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ final class WP_oEmbed_Controller {
if ( false === $wp_query->get( 'url', false ) ) {
status_header( 400 );
echo 'URL parameter missing';
return get_status_header_desc( 400 );
exit;
}
@ -88,7 +88,7 @@ final class WP_oEmbed_Controller {
if ( false === $data ) {
status_header( 404 );
return __( 'Invalid URL.' );
return get_status_header_desc( 404 );
}
if ( 'json' === $request['format'] ) {
@ -117,7 +117,7 @@ final class WP_oEmbed_Controller {
// Bail if the result couldn't be JSON encoded.
if ( ! $result || ! is_array( $data ) || empty( $data ) ) {
status_header( 501 );
return 'Not implemented';
return get_status_header_desc( 501 );
}
if ( ! headers_sent() ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta1-35407';
$wp_version = '4.4-beta1-35408';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.