Make WordPress Core


Ignore:
Timestamp:
10/27/2015 08:43:00 PM (10 years ago)
Author:
ocean90
Message:

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

Fixes #34275.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-oembed-controller.php

    r35354 r35408  
    3333        if ( false === $wp_query->get( 'url', false ) ) {
    3434            status_header( 400 );
    35             echo 'URL parameter missing';
     35            return get_status_header_desc( 400 );
    3636            exit;
    3737        }
     
    8989        if ( false === $data ) {
    9090            status_header( 404 );
    91             return __( 'Invalid URL.' );
     91            return get_status_header_desc( 404 );
    9292        }
    9393
     
    118118        if ( ! $result || ! is_array( $data ) || empty( $data ) ) {
    119119            status_header( 501 );
    120             return 'Not implemented';
     120            return get_status_header_desc( 501 );
    121121        }
    122122
Note: See TracChangeset for help on using the changeset viewer.