Make WordPress Core


Ignore:
Timestamp:
08/08/2008 05:05:10 PM (18 years ago)
Author:
westi
Message:

Lots of fixes for Notices when WP_DEBUG is set. See #6669 props santosj.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r8484 r8589  
    264264
    265265function wp_link_category_checklist( $link_id = 0 ) {
     266        $default = 1;
     267
    266268        if ( $link_id ) {
    267269                $checked_categories = wp_get_link_cats($link_id);
    … …  
    379381        $posts_columns = array();
    380382        $posts_columns['cb'] = '<input type="checkbox" />';
    381         if ( 'draft' === $_GET['post_status'] )
    382                 $posts_columns['modified'] = __('Modified');
    383         elseif ( 'pending' === $_GET['post_status'] )
    384                 $posts_columns['modified'] = __('Submitted');
    385         else
    386                 $posts_columns['date'] = __('Date');
     383
     384        $post_status = isset( $_GET['post_status'] ) ? $_GET['post_status'] : '';
     385
     386        switch( $post_status ) {
     387                case 'draft':
     388                        $posts_columns['modified'] = __('Modified');
     389                        break;
     390                case 'pending':
     391                        $posts_columns['modified'] = __('Submitted');
     392                        break;
     393                default:
     394                        $posts_columns['date'] = __('Date');
     395        }
     396
    387397        $posts_columns['title'] = __('Title');
    388398        $posts_columns['author'] = __('Author');
    389         if ( !in_array($_GET['post_status'], array('pending', 'draft', 'future')) )
     399        if ( !in_array($post_status, array('pending', 'draft', 'future')) )
    390400                $posts_columns['comments'] = '<div class="vers"><img alt="" src="images/comment-grey-bubble.png" /></div>';
    391401        $posts_columns['status'] = __('Status');
    … …  
    12111221
    12121222        foreach ( array('high', 'core', 'default', 'low') as $priority ) {
     1223                if ( ! isset( $wp_meta_boxes[$page][$context][$priority] ) )
     1224                        continue;
     1225
    12131226                foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) {
    12141227                        if ( false === $box )
Note: See TracChangeset for help on using the changeset viewer.