WordPress.org

Make WordPress Core

Ticket #5607: remove_admin_notices10.diff

File remove_admin_notices10.diff, 1.8 KB (added by filosofo, 7 years ago)
  • wp-admin/edit-page-form.php

     
    33<h2 id="write-post"><?php _e('Write Page'); ?></h2> 
    44<?php 
    55 
    6 if (0 == $post_ID) { 
     6if (empty($post_ID) || 0 == $post_ID) { 
    77        $form_action = 'post'; 
    88        $nonce_action = 'add-page'; 
    99        $temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post() 
     
    2020 
    2121$sendto = clean_url(stripslashes(wp_get_referer())); 
    2222 
    23 if ( 0 != $post_ID && $sendto == get_permalink($post_ID) ) 
     23if ( ! empty($post_ID) && $sendto == get_permalink($post_ID) ) 
    2424        $sendto = 'redo'; 
    2525?> 
    2626 
     
    7373 
    7474<fieldset id="passworddiv" class="dbx-box"> 
    7575<h3 class="dbx-handle"><?php _e('Page Password') ?></h3> 
    76 <div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></div> 
     76<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo ( isset($post->post_password) ) ? attribute_escape( $post->post_password ) : ''; ?>" /></div> 
    7777</fieldset> 
    7878 
    7979<fieldset id="pageparent" class="dbx-box"> 
     
    9898 
    9999<fieldset id="slugdiv" class="dbx-box"> 
    100100<h3 class="dbx-handle"><?php _e('Page Slug') ?></h3> 
    101 <div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" /></div> 
     101<div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( ( isset($post->post_name) ) ? $post->post_name : '' ); ?>" /></div> 
    102102</fieldset> 
    103103 
    104104<?php if ( $authors = get_editable_authors( $current_user->id ) ) : // TODO: ROLE SYSTEM ?>