+
+
+
+
-
-post_status ) { ?>
-
-
-
+
+
+post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?>
+post_status ) { ?>style="display:none" type="submit" name="save" id="save-post" value="" tabindex="4" class="button button-highlighted" />
+post_status && $can_publish ) { ?>
+
-
+
+post_status ) {
+ $preview_link = esc_url(get_permalink($post->ID));
+ $preview_button = __('Preview Changes');
+} else {
+ $preview_link = esc_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID))));
+ $preview_button = __('Preview');
+}
+?>
+
+
+
-
-
-
+
+
+
+
+
+post_status ) {
+ case 'private':
+ _e('Privately Published');
+ break;
+ case 'publish':
+ _e('Published');
+ break;
+ case 'future':
+ _e('Scheduled');
+ break;
+ case 'pending':
+ _e('Pending Review');
+ break;
+ case 'draft':
+ _e('Draft');
+ break;
+}
+?>
+
+post_status || 'private' == $post->post_status || $can_publish ) { ?>
+
post_status ) { ?>style="display:none;" class="edit-post-status hide-if-no-js" tabindex='4'>
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
post_status ) {
+ $post->post_password = '';
+ $visibility = 'private';
+ $visibility_trans = __('Private');
+} elseif ( !empty( $post->post_password ) ) {
+ $visibility = 'password';
+ $visibility_trans = __('Password protected');
+} else {
+ $visibility = 'public';
+ $visibility_trans = __('Public');
+}
+
+echo esc_html( $visibility_trans ); ?>
+
+
+
+
+
+
+
+
/>
+
/>
+
+
/>
+
+
+
+
+
+
+
+
ID ) {
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
- $stamp = __('Scheduled for:
%1$s at %2$s');
- } else if ( 'publish' == $post->post_status ) { // already published
- $stamp = __('Published on:
%1$s at %2$s');
- } else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified
- $stamp = __('Publish immediately');
+ $stamp = __('Scheduled for:
%1$s');
+ } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published
+ $stamp = __('Published on:
%1$s');
+ } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified
+ $stamp = __('Publish
immediately');
+ } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified
+ $stamp = __('Schedule for:
%1$s');
} else { // draft, 1 or more saves, date specified
- $stamp = __('Publish on:
%1$s at %2$s');
+ $stamp = __('Publish on:
%1$s');
}
- $date = mysql2date(get_option('date_format'), $post->post_date);
- $time = mysql2date(get_option('time_format'), $post->post_date);
+ $date = date_i18n( $datef, strtotime( $post->post_date ) );
} else { // draft (no saves, and thus no date specified)
- $stamp = __('Publish immediately');
- $date = mysql2date(get_option('date_format'), current_time('mysql'));
- $time = mysql2date(get_option('time_format'), current_time('mysql'));
+ $stamp = __('Publish
immediately');
+ $date = date_i18n( $datef, strtotime( current_time('mysql') ) );
}
-?>
-
-
-
+if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+ $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column'=> 'menu_order, post_title')); ?>
+
+
+
+
+
+
+
+
+
+
+
+ID);
+ list_meta($metadata);
+ meta_form(); ?>
+
+
+
use in your theme.'); ?>
+
+
+
+
+
trackbacks and pingbacks.'); ?>
+
+
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') . "";
+$authors = get_editable_user_ids( $current_user->id, true, 'page' ); // TODO: ROLE SYSTEM
+if ( $post->post_author && !in_array($post->post_author, $authors) )
+ $authors[] = $post->post_author;
+if ( $authors && count( $authors ) > 1 ) {
+ /**
+ * Display page author form fields, when more than one author exists.
+ *
+ * @since 2.6.0
+ *
+ * @param object $post
+ */
+ function page_author_meta_box($post){
+ global $current_user, $user_ID;
+ $authors = get_editable_user_ids( $current_user->id, true, 'page' ); // TODO: ROLE SYSTEM
+ if ( $post->post_author && !in_array($post->post_author, $authors) )
+ $authors[] = $post->post_author;
?>
-
-
-display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
-} else {
- 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));
+
$authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>
+
-
-
-
-
-
-
+
-
+
+
+
+
+';
+?>
+
+
+
+
+
+
+
+
+post_status ) wp_original_referer_field(true, 'previous'); ?>
+
+
+
+
+
+
-
-
+
+
ID); ?>
@@ -174,121 +449,46 @@ endif; ?>
-
-post_content); ?>
-
-
-
-
-
-
-
-
-
-
+post_content); ?>
+
+ |
+
+
-
-
-
-
-
display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
+ } else {
+ 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));
+ }
+ }
?>
+
+
- |
-
-
-
use in your theme.'); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+wp_nonce_field( 'autosave', 'autosavenonce', false );
+wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
+wp_nonce_field( 'getpermalink', 'getpermalinknonce', false );
+wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
+wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
id ); // TODO: ROLE SYSTEM
-if ( $post->post_author && !in_array($post->post_author, $authors) )
- $authors[] = $post->post_author;
-if ( $authors && count( $authors ) > 1 ) :
+do_meta_boxes('page', 'normal', $post);
+do_action('edit_page_form');
+do_meta_boxes('page', 'advanced', $post);
?>
-
-
-
- $authors, 'name' => 'post_author_override', 'selected' => empty($post_ID) ? $user_ID : $post->post_author) ); ?>
-
-
-
-
-
-