Make WordPress Core

Ticket #5607: remove_admin_notices.diff

File remove_admin_notices.diff, 2.1 KB (added by filosofo, 17 years ago)
  • wp-includes/post-template.php

     
    5656        $title = $post->post_title;
    5757        if ( !empty($post->post_password) )
    5858                $title = sprintf(__('Protected: %s'), $title);
    59         else if ( 'private' == $post->post_status )
     59        else if ( isset($post->post_status) && 'private' == $post->post_status )
    6060                $title = sprintf(__('Private: %s'), $title);
    6161
    6262        return apply_filters( 'the_title', $title );
     
    443443                        $post->iconsize = array($imagesize[0], $imagesize[1]);
    444444                        $constraint = '';
    445445                }
     446        } else {
     447                $constraint = '';
    446448        }
    447449
    448450        $post_title = attribute_escape($post->post_title);
  • wp-includes/bookmark.php

     
    184184                $recently_updated_test = '';
    185185        }
    186186
    187         if ($show_updated) {
    188                 $get_updated = ", UNIX_TIMESTAMP(link_updated) AS link_updated_f ";
    189         }
     187        $get_updated = ( $show_updated ) ? ", UNIX_TIMESTAMP(link_updated) AS link_updated_f " : '';
    190188
    191189        $orderby = strtolower($orderby);
    192190        $length = '';
  • wp-includes/link-template.php

     
    142142
    143143        $pagestruct = $wp_rewrite->get_page_permastruct();
    144144
    145         if ( '' != $pagestruct && 'draft' != $post->post_status ) {
     145        if ( '' != $pagestruct && ( empty($post->post_status) || 'draft' != $post->post_status ) ) {
    146146                $link = get_page_uri($id);
    147147                $link = str_replace('%pagename%', $link, $pagestruct);
    148148                $link = get_option('home') . "/$link";
     
    597597        $request = remove_query_arg( 'paged' );
    598598
    599599        $home_root = parse_url(get_option('home'));
    600         $home_root = $home_root['path'];
     600        $home_root = ( isset($home_root['path']) ) ? $home_root['path'] : null;
    601601        $home_root = preg_quote( trailingslashit( $home_root ), '|' );
    602602
    603603        $request = preg_replace('|^'. $home_root . '|', '', $request);