| 55 | | <<<<<<< .working |
|---|
| 56 | | ======= |
|---|
| 57 | | if (isset($mode) && 'bookmarklet' == $mode) |
|---|
| 58 | | echo '<input type="hidden" name="mode" value="bookmarklet" />'; |
|---|
| 59 | | ?> |
|---|
| 60 | | <input type="hidden" id="user-id" name="user_ID" value="<?php echo $user_ID ?>" /> |
|---|
| 61 | | <input type="hidden" id="hiddenaction" name="action" value='<?php echo $form_action ?>' /> |
|---|
| 62 | | <input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" /> |
|---|
| 63 | | <input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" /> |
|---|
| 64 | | <?php echo $form_extra ?> |
|---|
| 65 | | <input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" /> |
|---|
| 66 | | <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" /> |
|---|
| 67 | | <input name="referredby" type="hidden" id="referredby" value="<?php |
|---|
| 68 | | if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) == $post_ID ) |
|---|
| 69 | | echo 'redo'; |
|---|
| 70 | | else |
|---|
| 71 | | echo clean_url(stripslashes(wp_get_referer())); |
|---|
| 72 | | ?>" /> |
|---|
| 73 | | <?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?> |
|---|
| 74 | | |
|---|
| 75 | | <div id="poststuff"> |
|---|
| 76 | | |
|---|
| 77 | | <div class="submitbox" id="submitpage"> |
|---|
| 78 | | |
|---|
| 79 | | <div id="previewview"> |
|---|
| 80 | | <?php if ( 'publish' == $post->post_status ) { ?> |
|---|
| 81 | | <a href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Page'); ?></a> |
|---|
| 82 | | <?php } elseif ( 'edit' == $action ) { ?> |
|---|
| 83 | | <a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview this Page'); ?></a> |
|---|
| 84 | | <?php } ?> |
|---|
| 85 | | </div> |
|---|
| 86 | | |
|---|
| 87 | | <div class="inside"> |
|---|
| 88 | | <p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p> |
|---|
| 89 | | <p> |
|---|
| 90 | | <select name='post_status' tabindex='4' id='post_status'> |
|---|
| 91 | | <?php // Show publish in dropdown if user can publish or if they can re-publish this page ('edit_published_pages') |
|---|
| 92 | | // 'publish' option will be selected for published AND private posts (checkbox overrides dropdown) |
|---|
| 93 | | if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) : |
|---|
| 94 | | ?> |
|---|
| 95 | | <option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option> |
|---|
| 96 | | <?php endif; ?> |
|---|
| 97 | | <?php if ( 'future' == $post->post_status ) : ?> |
|---|
| 98 | | <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Pending') ?></option> |
|---|
| 99 | | <?php endif; ?> |
|---|
| 100 | | <option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option> |
|---|
| 101 | | <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option> |
|---|
| 102 | | </select> |
|---|
| 103 | | </p> |
|---|
| 104 | | <?php if ( current_user_can( 'publish_posts' ) ) : ?> |
|---|
| 105 | | <p><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex='4' /> <?php _e('Keep this page private') ?></label></p> |
|---|
| 106 | | <?php endif; ?> |
|---|
| 107 | | |
|---|
| 108 | | <?php |
|---|
| 109 | | if ( 0 != $post_ID ) { |
|---|
| 110 | | if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date |
|---|
| 111 | | $stamp = __('Scheduled for:<br />%1$s at %2$s'); |
|---|
| 112 | | } else if ( 'publish' == $post->post_status ) { // already published |
|---|
| 113 | | $stamp = __('Published on:<br />%1$s at %2$s'); |
|---|
| 114 | | } else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified |
|---|
| 115 | | $stamp = __('Publish immediately'); |
|---|
| 116 | | } else { // draft, 1 or more saves, date specified |
|---|
| 117 | | $stamp = __('Publish on:<br />%1$s at %2$s'); |
|---|
| 118 | | } |
|---|
| 119 | | $date = mysql2date(get_option('date_format'), $post->post_date); |
|---|
| 120 | | $time = mysql2date(get_option('time_format'), $post->post_date); |
|---|
| 121 | | } else { // draft (no saves, and thus no date specified) |
|---|
| 122 | | $stamp = __('Publish immediately'); |
|---|
| 123 | | $date = mysql2date(get_option('date_format'), current_time('mysql')); |
|---|
| 124 | | $time = mysql2date(get_option('time_format'), current_time('mysql')); |
|---|
| 125 | | } |
|---|
| 126 | | ?> |
|---|
| 127 | | <p class="curtime"><?php printf($stamp, $date, $time); ?> |
|---|
| 128 | | <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a></p> |
|---|
| 129 | | |
|---|
| 130 | | <div id='timestampdiv' class='hide-if-js'><?php touch_time(($action == 'edit'),1,4); ?></div> |
|---|
| 131 | | |
|---|
| 132 | | </div> |
|---|
| 133 | | |
|---|
| 134 | | <p class="submit"> |
|---|
| 135 | | <input type="submit" name="save" class="button button-highlighted" value="<?php _e('Save'); ?>" tabindex="4" /> |
|---|
| 136 | | <?php |
|---|
| 137 | | if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) { |
|---|
| 138 | | ?> |
|---|
| 139 | | <?php if ( current_user_can('publish_pages') ) : ?> |
|---|
| 140 | | <input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> |
|---|
| 141 | | <?php else : ?> |
|---|
| 142 | | <input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" /> |
|---|
| 143 | | <?php endif; ?> |
|---|
| 144 | | <?php |
|---|
| 145 | | } |
|---|
| 146 | | |
|---|
| 147 | | if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) ) |
|---|
| 148 | | echo "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&post=$post_ID", 'delete-page_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete page') . "</a>"; |
|---|
| 149 | | ?> |
|---|
| 150 | | <br class="clear" /> |
|---|
| 151 | | <?php if ( 0 != $post_ID ) : ?> |
|---|
| 152 | | <?php if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { |
|---|
| 153 | | $last_user = get_userdata($last_id); |
|---|
| 154 | | printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); |
|---|
| 155 | | } else { |
|---|
| 156 | | printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); |
|---|
| 157 | | } |
|---|
| 158 | | ?> |
|---|
| 159 | | <br class="clear" /> |
|---|
| 160 | | <?php endif; ?> |
|---|
| 161 | | <span id="autosave"></span> |
|---|
| 162 | | <span id="wp-word-count"></span> |
|---|
| 163 | | </p> |
|---|
| 164 | | |
|---|
| 165 | | <div class="side-info"> |
|---|
| 166 | | <h5><?php _e('Related') ?></h5> |
|---|
| 167 | | |
|---|
| 168 | | <ul> |
|---|
| 169 | | <?php if ( 0 != $post_ID ) : ?> |
|---|
| 170 | | <li><a href="edit-pages.php?page_id=<?php echo $post_ID ?>"><?php _e('See Comments on this Page') ?></a></li> |
|---|
| 171 | | <?php endif; ?> |
|---|
| 172 | | <li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li> |
|---|
| 173 | | <li><a href="edit-pages.php"><?php _e('Manage All Pages') ?></a></li> |
|---|
| 174 | | <?php do_action('page_relatedlinks_list'); ?> |
|---|
| 175 | | </ul> |
|---|
| 176 | | </div> |
|---|
| 177 | | <?php do_action('submitpage_box'); ?> |
|---|
| 178 | | </div> |
|---|
| 179 | | |
|---|
| 180 | | <div id="post-body"> |
|---|
| 181 | | <div id="titlediv"> |
|---|
| 182 | | <h3><label for="title"><?php _e('Title') ?></label></h3> |
|---|
| 183 | | <div id="titlewrap"> |
|---|
| 184 | | <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" autocomplete="off" /> |
|---|
| 185 | | </div> |
|---|
| 186 | | <div class="inside"> |
|---|
| 187 | | <?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?> |
|---|
| 188 | | <div id="edit-slug-box"> |
|---|
| 189 | | <?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) : |
|---|
| 190 | | echo $sample_permalink_html; |
|---|
| 191 | | endif; ?> |
|---|
| 192 | | </div> |
|---|
| 193 | | </div> |
|---|
| 194 | | </div> |
|---|
| 195 | | |
|---|
| 196 | | <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea"> |
|---|
| 197 | | <h3><label for="content"><?php _e('Page') ?></label></h3> |
|---|
| 198 | | <?php the_editor($post->post_content); ?> |
|---|
| 199 | | <?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?> |
|---|
| 200 | | <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> |
|---|
| 201 | | <?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?> |
|---|
| 202 | | <?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?> |
|---|
| 203 | | </div> |
|---|
| 204 | | |
|---|
| 205 | | <?php do_meta_boxes('page', 'normal', $post); ?> |
|---|
| 206 | | |
|---|
| 207 | | <?php do_action('edit_page_form'); ?> |
|---|
| 208 | | |
|---|
| 209 | | <h2><?php _e('Advanced Options'); ?></h2> |
|---|
| 210 | | |
|---|
| 211 | | |
|---|
| 212 | | <?php |
|---|
| 213 | | >>>>>>> .merge-right.r8619 |
|---|