Ticket #21391: 21391.2.diff
File 21391.2.diff, 22.3 KB (added by , 13 years ago) |
---|
-
wp-includes/link-template.php
106 106 if ( $post->post_type == 'page' ) 107 107 return get_page_link($post->ID, $leavename, $sample); 108 108 elseif ( $post->post_type == 'attachment' ) 109 return get_attachment_link( $post->ID);109 return get_attachment_link( $post->ID, $leavename ); 110 110 elseif ( in_array($post->post_type, get_post_types( array('_builtin' => false) ) ) ) 111 111 return get_post_permalink($post->ID, $leavename, $sample); 112 112 … … 292 292 * @since 2.0.0 293 293 * 294 294 * @param mixed $post Optional. Post ID or object. 295 * @param bool $leavename Optional. Leave name. 295 296 * @return string 296 297 */ 297 function get_attachment_link( $post = null ) {298 function get_attachment_link( $post = null, $leavename = false ) { 298 299 global $wp_rewrite; 299 300 300 301 $link = false; … … 314 315 $name = $post->post_name; 315 316 316 317 if ( strpos($parentlink, '?') === false ) 317 $link = user_trailingslashit( trailingslashit($parentlink) . $name ); 318 $link = user_trailingslashit( trailingslashit($parentlink) . '%postname%' ); 319 320 if ( ! $leavename ) 321 $link = str_replace( '%postname%', $name, $link ); 318 322 } 319 323 320 324 if ( ! $link ) -
wp-includes/post.php
53 53 register_post_type( 'attachment', array( 54 54 'labels' => array( 55 55 'name' => __( 'Media' ), 56 'name' => _x('Media', 'post type general name'), 57 'singular_name' => _x( 'Media Item', 'post type singular name' ), 58 'add_new' => _x( 'Add New', 'media item'), 59 'add_new_item' => __( 'Add New Media' ), 56 60 'edit_item' => __( 'Edit Media' ), 61 'new_item' => __( 'New Media Item' ), 62 'view_item' => __( 'View Attachment Page' ), 63 'search_items' => __( 'Search Media' ), 64 'not_found' => __( 'No media found.' ), 65 'not_found_in_trash' => __('No media found in Trash.'), 66 'parent_item_colon' => __('Parent:'), 67 'all_items' => __( 'All Media' ), 57 68 ), 58 69 'public' => true, 59 'show_ui' => false,70 'show_ui' => true, 60 71 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 61 '_edit_link' => ' media.php?attachment_id=%d', /* internal use only. don't use this when registering your own post type. */72 '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ 62 73 'capability_type' => 'post', 63 74 'map_meta_cap' => true, 64 75 'hierarchical' => false, … … 66 77 'query_var' => false, 67 78 'show_in_nav_menus' => false, 68 79 'delete_with_user' => true, 69 'supports' => array( 'comments', 'author' ), 80 'supports' => array( 'title', 'editor', 'author', 'comments', 'image_editor' ), 81 'disables' => array( 'save', 'preview', 'post_status', 'visibility' ) 70 82 ) ); 71 83 72 84 register_post_type( 'revision', array( … … 1099 1111 'capability_type' => 'post', 'capabilities' => array(), 'map_meta_cap' => null, 1100 1112 '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'hierarchical' => false, 1101 1113 'public' => false, 'rewrite' => true, 'has_archive' => false, 'query_var' => true, 1102 'supports' => array(), ' register_meta_box_cb' => null,1114 'supports' => array(), 'disables' => array(), 'register_meta_box_cb' => null, 1103 1115 'taxonomies' => array(), 'show_ui' => null, 'menu_position' => null, 'menu_icon' => null, 1104 1116 'can_export' => true, 1105 1117 'show_in_nav_menus' => null, 'show_in_menu' => null, 'show_in_admin_bar' => null, … … 1159 1171 add_post_type_support($post_type, array('title', 'editor')); 1160 1172 } 1161 1173 1174 if ( ! empty($args->disables) ) { 1175 disable_for_post_type($post_type, $args->disables); 1176 unset($args->disables); 1177 } 1178 1162 1179 if ( false !== $args->query_var && !empty($wp) ) { 1163 1180 if ( true === $args->query_var ) 1164 1181 $args->query_var = $post_type; … … 1516 1533 } 1517 1534 1518 1535 /** 1536 * Disable long-existing features for a post type 1537 * 1538 * Can't later add post type support for certain things 1539 * 1540 * @since 3.5.0 1541 * @param string $post_type The post type for which to remove the feature 1542 * @param string|array $feature the feature being removed, can be an array of feature strings or a single string 1543 */ 1544 function disable_for_post_type( $post_type, $feature ) { 1545 global $_wp_post_type_disabled; 1546 1547 $features = (array) $feature; 1548 foreach ($features as $feature) { 1549 if ( func_num_args() == 2 ) 1550 $_wp_post_type_disabled[$post_type][$feature] = true; 1551 else 1552 $_wp_post_type_disabled[$post_type][$feature] = array_slice( func_get_args(), 2 ); 1553 } 1554 } 1555 1556 /** 1557 * Get all the disabled post type features 1558 * 1559 * @since 3.5.0 1560 * @param string $post_type The post type 1561 * @return array 1562 */ 1563 1564 function get_all_disabled_for_post_type( $post_type ) { 1565 global $_wp_post_type_disabled; 1566 1567 if ( isset( $_wp_post_type_disabled[$post_type] ) ) 1568 return $_wp_post_type_disabled[$post_type]; 1569 1570 return array(); 1571 } 1572 1573 /** 1574 * Checks whether a post type disables a given feature 1575 * 1576 * @since 3.5.0 1577 * @param string $post_type The post type being checked 1578 * @param string $feature the feature being checked 1579 * @return boolean 1580 */ 1581 1582 function post_type_disables( $post_type, $feature ) { 1583 global $_wp_post_type_disabled; 1584 1585 if ( !isset( $_wp_post_type_disabled[$post_type][$feature] ) ) 1586 return false; 1587 1588 // If no args passed then no extra checks need be performed 1589 if ( func_num_args() <= 2 ) 1590 return true; 1591 1592 return true; 1593 } 1594 1595 /** 1519 1596 * Updates the post type for the post ID. 1520 1597 * 1521 1598 * The page or post cache will be cleaned for the post ID. -
wp-admin/includes/post.php
1065 1065 1066 1066 list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug); 1067 1067 1068 if ( 'publish' == $post->post_status) {1068 if ( 'publish' == get_post_status( $post ) ) { 1069 1069 $ptype = get_post_type_object($post->post_type); 1070 1070 $view_post = $ptype->labels->view_item; 1071 1071 $title = __('Click to edit this part of the permalink'); … … 1099 1099 } 1100 1100 } 1101 1101 1102 $post_name_html = '<span id="editable-post-name" title="' . $title. '">' . $post_name_abridged . '</span>';1102 $post_name_html = '<span id="editable-post-name" title="' . __('Click to edit this part of the permalink') . '">' . $post_name_abridged . '</span>'; 1103 1103 $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink); 1104 1104 $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink); 1105 1105 $return = '<strong>' . __('Permalink:') . "</strong>\n"; -
wp-admin/includes/screen.php
98 98 if ( 'post' == $screen->base ) { 99 99 if ( 'post' == $screen->post_type || 'page' == $screen->post_type ) 100 100 $hidden = array('slugdiv', 'trackbacksdiv', 'postcustom', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv'); 101 elseif ( 'attachment' == $screen->post_type ) 102 $hidden = array( 'slugdiv', 'trackbacksdiv', 'postcustom', 'authordiv', 'revisionsdiv' ); 101 103 else 102 104 $hidden = array( 'slugdiv' ); 103 105 } -
wp-admin/includes/media.php
858 858 859 859 /** 860 860 * Filters input from media_upload_form_handler() and assigns a default 861 * post_title from the file name if none supplied. 861 * post_title from the file name if none supplied. 862 862 * 863 * Illustrates the use of the attachment_fields_to_save filter 863 * Illustrates the use of the attachment_fields_to_save filter 864 864 * which can be used to add default values to any field before saving to DB. 865 865 * 866 866 * @since 2.5.0 … … 2095 2095 echo '<p>' . sprintf( __( 'Sorry, you have used all of your storage quota of %s MB.' ), get_space_allowed() ) . '</p>'; 2096 2096 } 2097 2097 2098 /** 2099 * Displays the image and editor in the post editor 2100 * 2101 * @since 3.5.0 2102 */ 2103 function edit_form_image_editor() { 2104 $post = get_post(); 2105 2106 if ( ( $attachment_id = intval( $post->ID ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) ) 2107 $thumb_url = $thumb_url[0]; 2108 else 2109 $thumb_url = false; 2110 2111 $filename = esc_html( basename( $post->guid ) ); 2112 $title = esc_attr( $post->post_title ); 2113 2114 2115 $post_mime_types = get_post_mime_types(); 2116 $keys = array_keys( wp_match_mime_types( array_keys( $post_mime_types ), $post->post_mime_type ) ); 2117 $type = array_shift( $keys ); 2118 $type_html = "<input type='hidden' id='type-of-$attachment_id' value='" . esc_attr( $type ) . "' />"; 2119 2120 2121 $media_dims = ''; 2122 $meta = wp_get_attachment_metadata( $post->ID ); 2123 if ( is_array( $meta ) && array_key_exists( 'width', $meta ) && array_key_exists( 'height', $meta ) ) 2124 $media_dims .= "<span id='media-dims-$post->ID'>{$meta['width']} × {$meta['height']}</span> "; 2125 $media_dims = apply_filters( 'media_meta', $media_dims, $post ); 2126 2127 $image_edit_button = ''; 2128 if ( gd_edit_image_support( $post->post_mime_type ) ) { 2129 $nonce = wp_create_nonce( "image_editor-$post->ID" ); 2130 $image_edit_button = "<input type='button' id='imgedit-open-btn-$post->ID' onclick='imageEdit.open( $post->ID, \"$nonce\" )' class='button' value='" . esc_attr__( 'Edit Image' ) . "' /> <img src='" . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . "' class='imgedit-wait-spin' alt='' />"; 2131 } 2132 2133 ?> 2134 <div class="wp_attachment_holder"> 2135 <div class="imgedit-response" id="imgedit-response-<?php echo $attachment_id; ?>"></div> 2136 2137 <div class="wp_attachment_image" id="media-head-<?php echo $attachment_id; ?>"> 2138 <p><img class="thumbnail" src="<?php echo $thumb_url; ?>" alt="" /></p> 2139 <p><?php echo $image_edit_button; ?></p> 2140 </div> 2141 <div style="display:none" class="image-editor" id="image-editor-<?php echo $attachment_id; ?>"></div> 2142 2143 <div class="wp_attachment_details"> 2144 <p><strong><?php _e( 'File name:' ); ?></strong> <?php echo $filename; ?></p> 2145 <p><strong><?php _e( 'File type:' ); ?></strong> <?php echo $post->post_mime_type; ?></p> 2146 <?php 2147 if ( !empty( $media_dims ) ) 2148 echo '<p><strong>' . __( 'Dimensions:' ) . "</strong> $media_dims</p>"; 2149 ?> 2150 </div> 2151 </div> 2152 <?php 2153 } 2154 2098 2155 add_filter( 'async_upload_image', 'get_media_item', 10, 2 ); 2099 2156 add_filter( 'async_upload_audio', 'get_media_item', 10, 2 ); 2100 2157 add_filter( 'async_upload_video', 'get_media_item', 10, 2 ); -
wp-admin/includes/meta-boxes.php
26 26 </div> 27 27 28 28 <div id="minor-publishing-actions"> 29 <?php if ( ! post_type_disables( $post->post_type, 'save' ) ) : ?> 29 30 <div id="save-action"> 30 31 <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> 31 32 <input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" class="button button-highlighted" /> … … 34 35 <?php } ?> 35 36 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="draft-ajax-loading" alt="" /> 36 37 </div> 37 <?php if ( $post_type_object->public ) : ?> 38 <?php endif; // doesn't disable save button ?> 39 <?php if ( ! post_type_disables( $post->post_type, 'preview' ) && $post_type_object->public ) : ?> 38 40 <div id="preview-action"> 39 41 <?php 40 42 if ( 'publish' == $post->post_status ) { … … 55 57 56 58 <div id="misc-publishing-actions"> 57 59 60 <?php if ( ! post_type_disables( $post->post_type, 'post_status' ) ) : ?> 58 61 <div class="misc-pub-section"><label for="post_status"><?php _e('Status:') ?></label> 62 59 63 <span id="post-status-display"> 60 64 <?php 61 65 switch ( $post->post_status ) { … … 104 108 105 109 <?php } ?> 106 110 </div><?php // /misc-pub-section ?> 111 <?php endif; // doesn't disable post_status ?> 107 112 113 <?php if ( ! post_type_disables( $post->post_type, 'visibility' ) ) : ?> 108 114 <div class="misc-pub-section" id="visibility"> 109 115 <?php _e('Visibility:'); ?> <span id="post-visibility-display"><?php 110 116 … … 149 155 <?php } ?> 150 156 151 157 </div><?php // /misc-pub-section ?> 158 <?php endif; // doesn't disable visibility ?> 152 159 153 160 <?php 154 161 // translators: Publish box date format, see http://php.net/date 155 162 $datef = __( 'M j, Y @ G:i' ); 156 163 if ( 0 != $post->ID ) { 157 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 164 if ( 'attachment' == get_post_type() ) { // attachments are uploaded on a date 165 $stamp = __('Uploaded on: <b>%1$s</b>'); 166 } else if ( 'future' == get_post_status() ) { // scheduled for publishing at a future date 158 167 $stamp = __('Scheduled for: <b>%1$s</b>'); 159 } else if ( 'publish' == $post->post_status || 'private' == $post->post_status) { // already published168 } else if ( 'publish' == get_post_status() || 'private' == get_post_status() ) { // already published 160 169 $stamp = __('Published on: <b>%1$s</b>'); 161 170 } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified 162 171 $stamp = __('Publish <b>immediately</b>'); … … 171 180 $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); 172 181 } 173 182 174 if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>183 if ( $can_publish && ! post_type_disables( $post->post_type, 'change_publish_date' ) ) : // Contributors don't get to choose the date of publish ?> 175 184 <div class="misc-pub-section curtime"> 176 185 <span id="timestamp"> 177 186 <?php printf($stamp, $date); ?></span> … … 202 211 <div id="publishing-action"> 203 212 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="ajax-loading" alt="" /> 204 213 <?php 205 if ( !in_array( $post->post_status, array('publish', 'future', 'private' ) ) || 0 == $post->ID ) {214 if ( !in_array( $post->post_status, array('publish', 'future', 'private', 'inherit') ) || 0 == $post->ID ) { 206 215 if ( $can_publish ) : 207 216 if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 208 217 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" /> … … 914 923 $thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true ); 915 924 echo _wp_post_thumbnail_html( $thumbnail_id ); 916 925 } 926 927 /** 928 * Display attachment/media-specific information 929 * 930 * @since 3.5.0 931 * 932 * @param object $post 933 */ 934 function attachment_data_meta_box( $post ) { 935 $att_url = wp_get_attachment_url( $post->ID ); 936 $alt_text = get_post_meta( $post->ID, '_wp_attachment_image_alt', true ); 937 ?> 938 <label for="_wp_attachment_image_alt"><strong>Alternative text</strong></label><br /> 939 <input type="text" class="widefat" name="_wp_attachment_image_alt" value="<?php echo esc_attr( $alt_text ); ?>" /> 940 </p> 941 942 <p> 943 <label for="excerpt"><strong>Excerpt</strong></label><br /> 944 <textarea class="widefat" name="excerpt"><?php echo $post->post_excerpt; ?></textarea> 945 </p> 946 947 <p> 948 <label for="attachment_url"><strong>File URL</strong></label><br /> 949 <input type="text" class="widefat urlfield" readonly="readonly" name="attachment_url" value="<?php echo esc_attr($att_url); ?>" /><br /> 950 <em><?php _e( 'Location of the uploaded file.' ); ?></em> 951 </p> 952 <?php 953 } -
wp-admin/css/wp-admin.css
3894 3894 margin: 8px 0; 3895 3895 } 3896 3896 3897 .describe .imgedit-wrap table td { 3897 .describe .imgedit-wrap table td, 3898 .wp_attachment_holder .imgedit-wrap table td { 3898 3899 vertical-align: top; 3899 3900 padding-top: 0; 3900 3901 } -
wp-admin/post.php
31 31 if ( $post ) { 32 32 $post_type = $post->post_type; 33 33 $post_type_object = get_post_type_object( $post_type ); 34 $parent_file = 'upload.php'; 34 35 } 35 36 36 37 /** … … 148 149 $parent_file = "edit.php"; 149 150 $submenu_file = "edit.php"; 150 151 $post_new_file = "post-new.php"; 152 } elseif ( 'attachment' === $post_type ) { 153 $parent_file = 'upload.php'; 154 $submenu_file = 'upload.php'; 155 $post_new_file = 'media-new.php'; 151 156 } else { 152 157 if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) 153 158 $parent_file = $post_type_object->show_in_menu; -
wp-admin/edit-form-advanced.php
23 23 wp_plupload_default_settings(); 24 24 add_action( 'admin_footer', 'wp_print_media_templates' ); 25 25 } 26 if ( post_type_supports( $post_type, 'image_editor' ) ) { 27 wp_enqueue_script('image-edit'); 28 wp_enqueue_style( 'imgareaselect' ); 29 } 26 30 27 31 /** 28 32 * Post ID global … … 77 81 78 82 $notice = false; 79 83 $form_extra = ''; 80 if ( 'auto-draft' == $post->post_status) {84 if ( 'auto-draft' == get_post_status( $post ) ) { 81 85 if ( 'edit' == $action ) 82 86 $post->post_title = ''; 83 87 $autosave = false; … … 131 135 if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' ) ) 132 136 add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low'); 133 137 138 if ( 'attachment' == $post_type ) 139 add_meta_box( 'attachmentdata', __('Attachment Data'), 'attachment_data_meta_box', null, 'normal', 'core' ); 140 134 141 if ( post_type_supports($post_type, 'excerpt') ) 135 142 add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', null, 'normal', 'core'); 136 143 … … 144 151 if ( post_type_supports($post_type, 'comments') ) 145 152 add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', null, 'normal', 'core'); 146 153 147 if ( ('publish' == $post->post_status || 'private' == $post->post_status) && post_type_supports($post_type, 'comments') )154 if ( ('publish' == get_post_status( $post ) || 'private' == get_post_status( $post )) && post_type_supports($post_type, 'comments') ) 148 155 add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', null, 'normal', 'core'); 149 156 150 if ( !( 'pending' == $post->post_status&& !current_user_can( $post_type_object->cap->publish_posts ) ) )157 if ( !( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) ) ) 151 158 add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', null, 'normal', 'core'); 152 159 153 160 if ( post_type_supports($post_type, 'author') ) { … … 158 165 if ( post_type_supports($post_type, 'revisions') && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) 159 166 add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', null, 'normal', 'core'); 160 167 168 if ( post_type_supports( $post_type, 'image_editor' ) ) 169 add_action( 'edit_form_advanced_before', 'edit_form_image_editor' ); 170 161 171 do_action('add_meta_boxes', $post_type, $post); 162 172 do_action('add_meta_boxes_' . $post_type, $post); 163 173 … … 263 273 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr( $form_action ) ?>" /> 264 274 <input type="hidden" id="post_author" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" /> 265 275 <input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr( $post_type ) ?>" /> 266 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status ) ?>" />276 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status ) ?>" /> 267 277 <input type="hidden" id="referredby" name="referredby" value="<?php echo esc_url(stripslashes(wp_get_referer())); ?>" /> 268 278 <?php if ( ! empty( $active_post_lock ) ) { ?> 269 279 <input type="hidden" id="active_post_lock" value="<?php echo esc_attr( implode( ':', $active_post_lock ) ); ?>" /> 270 280 <?php 271 281 } 272 if ( 'draft' != $post->post_status)282 if ( 'draft' != get_post_status( $post ) ) 273 283 wp_original_referer_field(true, 'previous'); 274 284 275 285 echo $form_extra; … … 283 293 284 294 <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>"> 285 295 <div id="post-body-content"> 286 <?php if ( post_type_supports($post_type, 'title') ) { ?> 296 <?php 297 do_action( 'edit_form_advanced_before'); 298 299 if ( post_type_supports($post_type, 'title') ) { 300 ?> 287 301 <div id="titlediv"> 288 302 <div id="titlewrap"> 289 303 <label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo apply_filters( 'enter_title_here', __( 'Enter title here' ), $post ); ?></label> … … 296 310 if ( !empty($shortlink) ) 297 311 $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button" onclick="prompt('URL:', jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>'; 298 312 299 if ( $post_type_object->public && ! ( 'pending' == $post->post_status&& !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?>313 if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?> 300 314 <div id="edit-slug-box"> 301 315 <?php 302 if ( ! empty($post->ID) && ! empty($sample_permalink_html) && 'auto-draft' != $post->post_status)316 if ( ! empty($post->ID) && ! empty($sample_permalink_html) && 'auto-draft' != get_post_status( $post ) ) 303 317 echo $sample_permalink_html; 304 318 ?> 305 319 </div> … … 311 325 wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); 312 326 ?> 313 327 </div> 314 <?php } ?>315 328 329 <?php 330 do_action( 'edit_form_after_title'); 331 } 332 ?> 333 316 334 <?php if ( post_type_supports($post_type, 'editor') ) { ?> 317 335 <div id="postdivrich" class="postarea"> 318 336 … … 323 341 <td class="autosave-info"> 324 342 <span class="autosave-message"> </span> 325 343 <?php 326 if ( 'auto-draft' != $post->post_status) {344 if ( 'auto-draft' != get_post_status( $post ) ) { 327 345 echo '<span id="last-edit">'; 328 346 if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { 329 347 $last_user = get_userdata($last_id); … … 337 355 </tr></tbody></table> 338 356 339 357 </div> 340 <?php } ?> 358 <?php 359 do_action( 'edit_form_after_editor'); 360 } 361 ?> 341 362 </div><!-- /post-body-content --> 342 363 343 364 <div id="postbox-container-1" class="postbox-container">