WordPress.org

Make WordPress Core

Ticket #5607: remove_admin_notices4.diff

File remove_admin_notices4.diff, 1.4 KB (added by filosofo, 10 years ago)
  • wp-includes/theme.php

     
    9898        $name = $theme = wp_kses( trim( $theme_name[1] ), $themes_allowed_tags );
    9999        $theme_uri = clean_url( trim( $theme_uri[1] ) );
    100100        $description = wptexturize( wp_kses( trim( $description[1] ), $themes_allowed_tags ) );
    101         $template = wp_kses( trim( $template[1] ), $themes_allowed_tags );
     101        $template = wp_kses( trim( (isset($template[1])) ? $template[1] : '' ), $themes_allowed_tags );
    102102
    103         $author_uri = clean_url( trim( $author_uri[1] ) );
     103        $author_uri = clean_url( trim( (isset($author_uri[1])) ? $author_uri[1] : '' ) );
    104104
    105105        if ( empty( $author_uri[1] ) ) {
    106106                $author = wp_kses( trim( $author_name[1] ), $themes_allowed_tags );
  • wp-includes/functions.php

     
    990990
    991991
    992992function wp_get_referer() {
    993         foreach ( array( $_REQUEST['_wp_http_referer'], $_SERVER['HTTP_REFERER'] ) as $ref )
    994                 if ( !empty( $ref ) )
    995                         return $ref;
     993        if ( ! empty( $_REQUEST['_wp_http_referer'] ) )
     994                return $_REQUEST['_wp_http_referer'];
     995        else if ( ! empty( $_SERVER['HTTP_REFERER'] ) )
     996                return $_SERVER['HTTP_REFERER'];
    996997        return false;
    997998}
    998999