Make WordPress Core


Ignore:
Timestamp:
08/08/2008 05:05:10 PM (17 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/edit-page-form.php

    r8530 r8589  
    11<?php
     2
     3if ( ! isset( $post_ID ) )
     4    $post_ID = 0;
     5
    26if ( isset($_GET['message']) )
    37    $_GET['message'] = absint( $_GET['message'] );
    4 $messages[1] = sprintf( __( 'Page updated. Continue editing below or <a href="%s">go back</a>.' ), attribute_escape( stripslashes( $_GET['_wp_original_http_referer'] ) ) );
     8$messages[1] = sprintf( __( 'Page updated. Continue editing below or <a href="%s">go back</a>.' ), attribute_escape( stripslashes( ( isset( $_GET['_wp_original_http_referer'] ) ? $_GET['_wp_original_http_referer'] : '') ) ) );
    59$messages[2] = __('Custom field updated.');
    610$messages[3] = __('Custom field deleted.');
     
    1317$notices[1] = __( 'There is an autosave of this page that is more recent than the version below.  <a href="%s">View the autosave</a>.' );
    1418
    15 if (!isset($post_ID) || 0 == $post_ID) {
     19if ( 0 == $post_ID) {
    1620    $form_action = 'post';
    1721    $nonce_action = 'add-page';
     
    103107
    104108<?php
    105 if ($post_ID) {
     109if ( 0 != $post_ID ) {
    106110    if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
    107111        $stamp = __('Scheduled for:<br />%1$s at %2$s');
     
    145149?>
    146150<br class="clear" />
    147 <?php if ($post_ID): ?>
     151<?php if ( 0 != $post_ID ) : ?>
    148152<?php if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
    149153    $last_user = get_userdata($last_id);
     
    163167
    164168<ul>
    165 <?php if ($post_ID): ?>
     169<?php if ( 0 != $post_ID ) : ?>
    166170<li><a href="edit-pages.php?page_id=<?php echo $post_ID ?>"><?php _e('See Comments on this Page') ?></a></li>
    167171<?php endif; ?>
     
    241245function page_password_meta_box($post){
    242246?>
    243 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Page') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></p>
     247<p><label class="hidden" for="post_password"><?php _e('Password Protect This Page') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo ( isset( $post->post_password ) ? attribute_escape( $post->post_password ) : '' ); ?>" /></p>
    244248<p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this page and its comments.'); ?></p>
    245249<?php
     
    305309
    306310
    307 if ( isset($post_ID) && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) :
     311if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) :
    308312function page_revisions_meta_box($post) {
    309313    wp_list_post_revisions();
Note: See TracChangeset for help on using the changeset viewer.