Make WordPress Core

Ticket #21472: status-header-custom-text.diff

File status-header-custom-text.diff, 699 bytes (added by nbachiyski, 12 years ago)
  • wp-includes/functions.php

     
    868868 * @param int $header HTTP status code
    869869 * @return unknown
    870870 */
    871 function status_header( $header ) {
    872         $text = get_status_header_desc( $header );
     871function status_header( $header, $text = null ) {
     872        if ( !$text ) {
     873                $text = get_status_header_desc( $header );
     874                if ( empty( $text ) )
     875                        return false;
     876        }
    873877
    874         if ( empty( $text ) )
    875                 return false;
    876 
    877878        $protocol = $_SERVER["SERVER_PROTOCOL"];
    878879        if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
    879880                $protocol = 'HTTP/1.0';