go back.' ), attribute_escape( stripslashes( ( isset( $_GET['_wp_original_http_referer'] ) ? $_GET['_wp_original_http_referer'] : '') ) ) ); $messages[2] = __('Custom field updated.'); $messages[3] = __('Custom field deleted.'); $messages[4] = __('Post updated.'); $messages[6] = __('Post published.'); $messages[7] = __('Post saved.'); if ( isset($_GET['revision']) ) $messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); $notice = false; $notices[1] = __( 'There is an autosave of this post that is more recent than the version below. View the autosave.' ); if ( 0 == $post_ID ) { $form_action = 'post'; $temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post() $form_extra = ""; $autosave = false; } else { $form_action = 'editpost'; $form_extra = ""; $autosave = wp_get_post_autosave( $post_ID ); // Detect if there exists an autosave newer than the post and if that autosave is different than the post if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) { foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { if ( wp_text_diff( $autosave->$autosave_field, $post->$autosave_field ) ) { $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); break; } } unset($autosave_field, $_autosave_field); } } // All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action). /** * Display post submit form fields. * * @since 2.7.0 * * @param object $post */ function post_submit_meta_box($post) { global $action; $can_publish = current_user_can('publish_posts'); ?>
post_status || 'private' == $post->post_status ) $savebtn = attribute_escape( __('Save') ); else $savebtn = attribute_escape( __('Save Draft') ); ?> post_status ) { ?> post_status, array('publish', 'future') ) || 0 == $post->ID ) { ?>
0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?>
use them in your template'); ?>
to_ping) ) .'" />'; if ('' != $post->pinged) { $pings = ''. __('Already pinged:') . '
()
pingbacks, no other action necessary.'); ?>
use in your theme.'); ?>
comment_count ) return; wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); ?>post_status && !current_user_can( 'publish_posts' ) ) ) add_meta_box('slugdiv', __('Post Slug'), 'post_slug_meta_box', 'post', 'normal', 'core'); $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM if ( $post->post_author && !in_array($post->post_author, $authors) ) $authors[] = $post->post_author; if ( $authors && count( $authors ) > 1 ) : /** * Display form field with list of authors. * * @since 2.6.0 * * @param object $post */ function post_author_meta_box($post) { global $current_user, $user_ID; $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM if ( $post->post_author && !in_array($post->post_author, $authors) ) $authors[] = $post->post_author; ?> $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>