Changeset 8589 for trunk/wp-admin/edit-form-advanced.php
- Timestamp:
- 08/08/2008 05:05:10 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r8577 r8589 1 1 <?php 2 3 if ( ! isset( $post_ID ) ) 4 $post_ID = 0; 2 5 3 6 $action = isset($action) ? $action : ''; 4 7 if ( isset($_GET['message']) ) 5 8 $_GET['message'] = absint( $_GET['message'] ); 6 $messages[1] = sprintf( __( 'Post updated. Continue editing below or <a href="%s">go back</a>.' ), attribute_escape( stripslashes( $_GET['_wp_original_http_referer']) ) );9 $messages[1] = sprintf( __( 'Post 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'] : '') ) ) ); 7 10 $messages[2] = __('Custom field updated.'); 8 11 $messages[3] = __('Custom field deleted.'); … … 15 18 $notices[1] = __( 'There is an autosave of this post that is more recent than the version below. <a href="%s">View the autosave</a>.' ); 16 19 17 if ( !isset($post_ID) ||0 == $post_ID ) {20 if ( 0 == $post_ID ) { 18 21 $form_action = 'post'; 19 22 $temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post() … … 55 58 <?php 56 59 57 if ( !isset($post_ID) ||0 == $post_ID)60 if ( 0 == $post_ID) 58 61 wp_nonce_field('add-post'); 59 62 else … … 124 127 <?php endif; ?> 125 128 <?php 126 if ( $post_ID) {129 if ( 0 != $post_ID ) { 127 130 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 128 131 $stamp = __('Scheduled for:<br />%1$s at %2$s'); … … 168 171 ?> 169 172 <br class="clear" /> 170 <?php if ( $post_ID): ?>173 <?php if ( 0 != $post_ID ): ?> 171 174 <?php if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { 172 175 $last_user = get_userdata($last_id); … … 186 189 187 190 <ul> 188 <?php if ( $post_ID): ?>191 <?php if ( 0 != $post_ID ): ?> 189 192 <li><a href="edit.php?p=<?php echo $post_ID ?>"><?php _e('See Comments on this Post') ?></a></li> 190 193 <?php endif; ?> … … 346 349 function post_password_meta_box($post) { 347 350 ?> 348 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></p>351 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php if ( isset( $post->post_password ) ) : echo attribute_escape( $post->post_password ); endif; ?>" /></p> 349 352 <p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this post and its comments.'); ?></p> 350 353 <?php … … 375 378 endif; 376 379 377 if ( isset($post_ID) &&0 < $post_ID && wp_get_post_revisions( $post_ID ) ) :380 if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) : 378 381 function post_revisions_meta_box($post) { 379 382 wp_list_post_revisions();
Note: See TracChangeset
for help on using the changeset viewer.