61 | | switch ( $post->post_status ) { |
62 | | case 'private': |
63 | | _e('Privately Published'); |
64 | | break; |
65 | | case 'publish': |
66 | | _e('Published'); |
67 | | break; |
68 | | case 'future': |
69 | | _e('Scheduled'); |
70 | | break; |
71 | | case 'pending': |
72 | | _e('Pending Review'); |
73 | | break; |
74 | | case 'draft': |
75 | | case 'auto-draft': |
76 | | _e('Draft'); |
77 | | break; |
78 | | } |
79 | | ?> |
80 | | </span> |
81 | | <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> |
82 | | <a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js"><?php _e('Edit') ?></a> |
| 61 | if ( current_user_can( "delete_post", $post->ID ) ) { |
| 62 | if ( !EMPTY_TRASH_DAYS ) |
| 63 | $delete_text = __('Delete Permanently'); |
| 64 | else |
| 65 | $delete_text = __('Move to Trash'); |
| 66 | ?> |
| 67 | <a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php |
| 68 | } ?> |
| 69 | </div> |
84 | | <div id="post-status-select" class="hide-if-js"> |
85 | | <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ('auto-draft' == $post->post_status ) ? 'draft' : $post->post_status); ?>" /> |
86 | | <select name='post_status' id='post_status'> |
87 | | <?php if ( 'publish' == $post->post_status ) : ?> |
88 | | <option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option> |
89 | | <?php elseif ( 'private' == $post->post_status ) : ?> |
90 | | <option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e('Privately Published') ?></option> |
91 | | <?php elseif ( 'future' == $post->post_status ) : ?> |
92 | | <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option> |
93 | | <?php endif; ?> |
94 | | <option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option> |
95 | | <?php if ( 'auto-draft' == $post->post_status ) : ?> |
96 | | <option<?php selected( $post->post_status, 'auto-draft' ); ?> value='draft'><?php _e('Draft') ?></option> |
97 | | <?php else : ?> |
98 | | <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Draft') ?></option> |
99 | | <?php endif; ?> |
100 | | </select> |
101 | | <a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e('OK'); ?></a> |
102 | | <a href="#post_status" class="cancel-post-status hide-if-no-js"><?php _e('Cancel'); ?></a> |
| 71 | <div id="publishing-action"> |
| 72 | <span class="spinner"></span> |
| 73 | <?php |
| 74 | if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { |
| 75 | if ( $can_publish ) : |
| 76 | if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> |
| 77 | <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" /> |
| 78 | <?php submit_button( __( 'Schedule' ), 'primary button-large', 'publish', false, array( 'accesskey' => 'p' ) ); ?> |
| 79 | <?php else : ?> |
| 80 | <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" /> |
| 81 | <?php submit_button( __( 'Publish' ), 'primary button-large', 'publish', false, array( 'accesskey' => 'p' ) ); ?> |
| 82 | <?php endif; |
| 83 | else : ?> |
| 84 | <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" /> |
| 85 | <?php submit_button( __( 'Submit for Review' ), 'primary button-large', 'publish', false, array( 'accesskey' => 'p' ) ); ?> |
| 86 | <?php |
| 87 | endif; |
| 88 | } else { ?> |
| 89 | <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" /> |
| 90 | <input name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="<?php esc_attr_e('Update') ?>" /> |
| 91 | <?php |
| 92 | } ?> |
| 109 | $post_type = $post->post_type; |
| 110 | $post_type_object = get_post_type_object($post_type); |
| 111 | $can_publish = current_user_can($post_type_object->cap->publish_posts); |
| 112 | ?> |
| 113 | <div class="submitbox" id="submitpost"> |
| 114 | <div id="misc-publishing-actions"> |
| 115 | <div class="misc-pub-section"> |
| 116 | <label for="post_status"><?php _e('Status:') ?></label> |
| 117 | <span id="post-status-display"> |
| 118 | <?php |
| 119 | switch ( $post->post_status ) { |
| 120 | case 'private': |
| 121 | _e('Privately Published'); |
| 122 | break; |
| 123 | case 'publish': |
| 124 | _e('Published'); |
| 125 | break; |
| 126 | case 'future': |
| 127 | _e('Scheduled'); |
| 128 | break; |
| 129 | case 'pending': |
| 130 | _e('Pending Review'); |
| 131 | break; |
| 132 | case 'draft': |
| 133 | case 'auto-draft': |
| 134 | _e('Draft'); |
| 135 | break; |
| 136 | } |
| 137 | ?> |
| 138 | </span> |
| 139 | <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> |
| 140 | <a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js"><?php _e('Edit') ?></a> |
| 141 | <div id="post-status-select" class="hide-if-js"> |
| 142 | <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ('auto-draft' == $post->post_status ) ? 'draft' : $post->post_status); ?>" /> |
| 143 | <select name='post_status' id='post_status'> |
| 144 | <?php if ( 'publish' == $post->post_status ) : ?> |
| 145 | <option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option> |
| 146 | <?php elseif ( 'private' == $post->post_status ) : ?> |
| 147 | <option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e('Privately Published') ?></option> |
| 148 | <?php elseif ( 'future' == $post->post_status ) : ?> |
| 149 | <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option> |
| 150 | <?php endif; ?> |
| 151 | <option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option> |
| 152 | <?php if ( 'auto-draft' == $post->post_status ) : ?> |
| 153 | <option<?php selected( $post->post_status, 'auto-draft' ); ?> value='draft'><?php _e('Draft') ?></option> |
| 154 | <?php else : ?> |
| 155 | <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Draft') ?></option> |
| 156 | <?php endif; ?> |
| 157 | </select> |
| 158 | <a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e('OK'); ?></a> |
| 159 | <a href="#post_status" class="cancel-post-status hide-if-no-js"><?php _e('Cancel'); ?></a> |
| 160 | </div> |
| 161 | <?php |
| 162 | } |
| 163 | ?> |
| 164 | </div><!-- .misc-pub-section --> |
| 165 | |
183 | | <?php do_action('post_submitbox_misc_actions'); ?> |
184 | | </div> |
| 241 | $the_revisions = wp_get_post_revisions( $post->ID ); |
| 242 | $revision_count = count( $the_revisions ); |
| 243 | if ( post_type_supports( $post_type, 'revisions' ) && 0 < $revision_count ) : |
| 244 | ?> |
| 245 | <div id="major-publishing-actions" > |
| 246 | <span id="revisions-link"><?php printf( _n( '%d Revision', '%d Revisions', $revision_count ), $revision_count ); ?></span> |
| 247 | <a href="revision.php?revision=<?php echo key( $the_revisions ) ?>&action=edit" class="edit-revisions hide-if-no-js"><?php _e( 'View' ) ?></a> |
201 | | |
202 | | <div id="publishing-action"> |
203 | | <span class="spinner"></span> |
204 | | <?php |
205 | | if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { |
206 | | if ( $can_publish ) : |
207 | | if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> |
208 | | <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" /> |
209 | | <?php submit_button( __( 'Schedule' ), 'primary button-large', 'publish', false, array( 'accesskey' => 'p' ) ); ?> |
210 | | <?php else : ?> |
211 | | <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" /> |
212 | | <?php submit_button( __( 'Publish' ), 'primary button-large', 'publish', false, array( 'accesskey' => 'p' ) ); ?> |
213 | | <?php endif; |
214 | | else : ?> |
215 | | <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" /> |
216 | | <?php submit_button( __( 'Submit for Review' ), 'primary button-large', 'publish', false, array( 'accesskey' => 'p' ) ); ?> |
217 | | <?php |
218 | | endif; |
219 | | } else { ?> |
220 | | <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" /> |
221 | | <input name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="<?php esc_attr_e('Update') ?>" /> |
222 | | <?php |
223 | | } ?> |
| 251 | <?php endif; ?> |
| 252 | <?php do_action('post_submitbox_misc_actions'); ?> |