Make WordPress Core

Ticket #12590: 12590.2.diff

File 12590.2.diff, 3.0 KB (added by scribu, 14 years ago)

Consistent feature names: 'excerpts' -> 'excerpt' and 'post-thumbnails' -> 'thumbnail'

  • wp-includes/post.php

     
    2525                                                                                'hierarchical' => false,
    2626                                                                                'rewrite' => false,
    2727                                                                                'query_var' => false,
    28                                                                                 'supports' => array('post-thumbnails', 'excerpts', 'trackbacks', 'custom-fields', 'comments', 'revisions')
     28                                                                                'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions')
    2929                                                                        ) );
    3030
    3131        register_post_type( 'page', array(      'label' => __('Pages'),
     
    3838                                                                                'hierarchical' => true,
    3939                                                                                'rewrite' => false,
    4040                                                                                'query_var' => false,
    41                                                                                 'supports' => array('post-thumbnails', 'page-attributes', 'custom-fields', 'comments', 'revisions')
     41                                                                                'supports' => array('title', 'editor', 'thumbnail', 'page-attributes', 'custom-fields', 'comments', 'revisions')
    4242                                                                        ) );
    4343
    4444        register_post_type( 'attachment', array('label' => __('Media'),
  • wp-admin/edit-form-advanced.php

     
    106106if ( post_type_supports($post_type, 'page-attributes') )
    107107        add_meta_box('pageparentdiv', __('Attributes'), 'page_attributes_meta_box', $post_type, 'side', 'core');
    108108
    109 if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports($post_type, 'post-thumbnails') )
     109if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports($post_type, 'thumbnail') )
    110110        add_meta_box('postimagediv', __('Post Thumbnail'), 'post_thumbnail_meta_box', $post_type, 'side', 'low');
    111111
    112 if ( post_type_supports($post_type, 'excerpts') )
     112if ( post_type_supports($post_type, 'excerpt') )
    113113        add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', $post_type, 'normal', 'core');
    114114
    115115if ( post_type_supports($post_type, 'trackbacks') )
     
    184184
    185185<div id="post-body">
    186186<div id="post-body-content">
     187<?php if ( post_type_supports($post_type, 'title') ) { ?>
    187188<div id="titlediv">
    188189<div id="titlewrap">
    189190        <label class="screen-reader-text" for="title"><?php _e('Title') ?></label>
     
    198199
    199200if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->publish_cap ) ) ) { ?>
    200201        <div id="edit-slug-box">
    201 <?php
    202         if ( ! empty($post->ID) && ! empty($sample_permalink_html) && 'auto-draft' != $post->post_status ) :
    203                 echo $sample_permalink_html;
    204 endif; ?>
     202        <?php
     203                if ( ! empty($post->ID) && ! empty($sample_permalink_html) && 'auto-draft' != $post->post_status )
     204                        echo $sample_permalink_html;
     205        ?>
    205206        </div>
    206207<?php
    207 } ?>
     208}
     209?>
    208210</div>
    209211</div>
     212<?php } ?>
    210213
     214<?php if ( post_type_supports($post_type, 'editor') ) { ?>
    211215<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
    212216
    213217<?php the_editor($post->post_content); ?>
     
    239243</div>
    240244
    241245<?php
     246}
    242247
    243248do_meta_boxes($post_type, 'normal', $post);
    244249