Changeset 13710
- Timestamp:
- 03/15/2010 09:16:41 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r13635 r13710 107 107 add_meta_box('pageparentdiv', __('Attributes'), 'page_attributes_meta_box', $post_type, 'side', 'core'); 108 108 109 if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports($post_type, ' post-thumbnails') )109 if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports($post_type, 'thumbnail') ) 110 110 add_meta_box('postimagediv', __('Post Thumbnail'), 'post_thumbnail_meta_box', $post_type, 'side', 'low'); 111 111 112 if ( post_type_supports($post_type, 'excerpt s') )112 if ( post_type_supports($post_type, 'excerpt') ) 113 113 add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', $post_type, 'normal', 'core'); 114 114 … … 129 129 add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', $post_type, 'normal', 'core'); 130 130 131 $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM 132 if ( $post->post_author && !in_array($post->post_author, $authors) ) 133 $authors[] = $post->post_author; 134 if ( $authors && count( $authors ) > 1 ) 135 add_meta_box('authordiv', __('Author'), 'post_author_meta_box', $post_type, 'normal', 'core'); 131 if ( post_type_supports($post_type, 'author') ) { 132 $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM 133 if ( $post->post_author && !in_array($post->post_author, $authors) ) 134 $authors[] = $post->post_author; 135 if ( $authors && count( $authors ) > 1 ) 136 add_meta_box('authordiv', __('Author'), 'post_author_meta_box', $post_type, 'normal', 'core'); 137 } 136 138 137 139 if ( post_type_supports($post_type, 'revisions') && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) … … 185 187 <div id="post-body"> 186 188 <div id="post-body-content"> 189 <?php if ( post_type_supports($post_type, 'title') ) { ?> 187 190 <div id="titlediv"> 188 191 <div id="titlewrap"> … … 199 202 if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->publish_cap ) ) ) { ?> 200 203 <div id="edit-slug-box"> 201 <?php202 if ( ! empty($post->ID) && ! empty($sample_permalink_html) && 'auto-draft' != $post->post_status ) :203 echo $sample_permalink_html;204 endif;?>204 <?php 205 if ( ! empty($post->ID) && ! empty($sample_permalink_html) && 'auto-draft' != $post->post_status ) 206 echo $sample_permalink_html; 207 ?> 205 208 </div> 206 209 <?php 207 } ?> 208 </div> 209 </div> 210 210 } 211 ?> 212 </div> 213 </div> 214 <?php } ?> 215 216 <?php if ( post_type_supports($post_type, 'editor') ) { ?> 211 217 <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea"> 212 218 … … 240 246 241 247 <?php 248 } 242 249 243 250 do_meta_boxes($post_type, 'normal', $post); -
trunk/wp-includes/post.php
r13695 r13710 26 26 'rewrite' => false, 27 27 'query_var' => false, 28 'supports' => array(' post-thumbnails', 'excerpts', 'trackbacks', 'custom-fields', 'comments', 'revisions')28 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions') 29 29 ) ); 30 30 … … 39 39 'rewrite' => false, 40 40 'query_var' => false, 41 'supports' => array(' post-thumbnails', 'page-attributes', 'custom-fields', 'comments', 'revisions')41 'supports' => array('title', 'editor', 'author', 'thumbnail', 'page-attributes', 'custom-fields', 'comments', 'revisions') 42 42 ) ); 43 43 … … 836 836 add_post_type_support($post_type, $args->supports); 837 837 unset($args->supports); 838 } else { 839 // Add default features 840 add_post_type_support($post_type, array('title', 'editor')); 838 841 } 839 842 … … 885 888 $_wp_post_type_features[$post_type][$feature] = array_slice( func_get_args(), 2 ); 886 889 } 890 } 891 892 /** 893 * Remove support for a feature from a post type. 894 * 895 * @since 3.0 896 * @param string $post_type The post type for which to remove the feature 897 * @param string $feature The feature being removed 898 */ 899 function remove_post_type_support( $post_type, $feature ) { 900 global $_wp_post_type_features; 901 902 if ( !isset($_wp_post_type_features[$post_type]) ) 903 return; 904 905 if ( isset($_wp_post_type_features[$post_type][$feature]) ) 906 unset($_wp_post_type_features[$post_type][$feature]); 887 907 } 888 908
Note: See TracChangeset
for help on using the changeset viewer.