WordPress.org

Make WordPress Core

Ticket #5607: remove_admin_notices13.diff

File remove_admin_notices13.diff, 2.2 KB (added by filosofo, 10 years ago)
  • wp-admin/link-add.php

     
    1616require('admin-header.php');
    1717?>
    1818
    19 <?php if ($_GET['added'] && '' != $_POST['link_name']) : ?>
     19<?php if ( ! empty($_GET['added']) && '' != $_POST['link_name']) : ?>
    2020<div id="message" class="updated fade"><p><?php _e('Link added.'); ?></p></div>
    2121<?php endif; ?>
    2222
  • wp-admin/edit.php

     
    44$title = __('Posts');
    55$parent_file = 'edit.php';
    66wp_enqueue_script( 'admin-posts' );
    7 if ( 1 == $_GET['c'] )
     7if ( isset($_GET['c']) && 1 == $_GET['c'] )
    88        wp_enqueue_script( 'admin-comments' );
    99require_once('admin-header.php');
    1010
     
    2525if ( is_single() ) {
    2626        printf(__('Comments on %s'), apply_filters( "the_title", $post->post_title));
    2727} else {
    28         if ( $post_listing_pageable && !is_archive() && !is_search() )
     28        if ( isset($post_listing_pageable) && $post_listing_pageable && !is_archive() && !is_search() )
    2929                $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label);
    3030        else
    31                 $h2_noun = $post_status_label;
     31                $h2_noun = ( isset($post_status_label) ) ? $post_status_label : null;
    3232        // Use $_GET instead of is_ since they can override each other
    3333        $h2_author = '';
    34         $_GET['author'] = (int) $_GET['author'];
     34        $_GET['author'] = ( isset($_GET['author']) ) ? (int) $_GET['author'] : 0;
    3535        if ( $_GET['author'] != 0 ) {
    3636                if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion
    3737                        $h2_author = ' ' . __('by other authors');
     
    105105<?php } ?>
    106106
    107107        <fieldset><legend><?php _e('Category&hellip;') ?></legend>
    108                 <?php wp_dropdown_categories('show_option_all='.__('All').'&hide_empty=1&hierarchical=1&show_count=1&selected='.$cat);?>
     108                <?php wp_dropdown_categories('show_option_all='.__('All').'&hide_empty=1&hierarchical=1&show_count=1&selected='.((isset($cat))?$cat:0));?>
    109109        </fieldset>
    110110        <input type="submit" id="post-query-submit" value="<?php _e('Filter &#187;'); ?>" class="button" />
    111111</form>