Make WordPress Core

Ticket #21391: attachment-show-ui.diff

File attachment-show-ui.diff, 3.9 KB (added by nacin, 13 years ago)

Some stuff I was playing with some time ago.

  • wp-includes/version.php

     
    1818 *
    1919 * @global string $tinymce_version
    2020 */
    21 $tinymce_version = '3541-21360';
     21$tinymce_version = '3541-21361';
    2222
    2323/**
    2424 * Holds the required PHP version
  • wp-includes/post.php

     
    5252
    5353        register_post_type( 'attachment', array(
    5454                'labels' => array(
    55                         'name' => __( 'Media' ),
     55                        'name' => _x('Media', 'post type general name'),
     56                        'singular_name' => _x( 'Media Item', 'post type singular name' ),
     57                        'add_new' => _x( 'Add New', 'media item'),
     58                        'add_new_item' => __( 'Add New Media' ),
    5659                        'edit_item' => __( 'Edit Media' ),
     60                        'new_item' => __( 'New Media Item' ),
     61                        'view_item' => __( 'View Attachment Page' ),
     62                        'search_items' => __( 'Search Media' ),
     63                        'not_found' => __( 'No media found.' ),
     64                        'not_found_in_trash' => __('No media found in Trash.'),
     65                        'parent_item_colon' => __('Parent:'),
     66                        'all_items' => __( 'All Media' ),
    5767                ),
    5868                'public' => true,
    59                 'show_ui' => false,
     69                'show_ui' => true,
    6070                '_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. */
     71                '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */
    6272                'capability_type' => 'post',
    6373                'map_meta_cap' => true,
    6474                'hierarchical' => false,
     
    6676                'query_var' => false,
    6777                'show_in_nav_menus' => false,
    6878                'delete_with_user' => true,
    69                 'supports' => array( 'comments', 'author' ),
     79                'supports' => array( 'title', 'author', 'comments' ),
    7080        ) );
    7181
    7282        register_post_type( 'revision', array(
  • wp-admin/includes/post.php

     
    10821082
    10831083        list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
    10841084
    1085         if ( 'publish' == $post->post_status ) {
     1085        if ( 'publish' == get_post_status( $post ) ) {
    10861086                $ptype = get_post_type_object($post->post_type);
    10871087                $view_post = $ptype->labels->view_item;
    10881088                $title = __('Click to edit this part of the permalink');
  • wp-admin/includes/screen.php

     
    9696        if ( $use_defaults ) {
    9797                $hidden = array();
    9898                if ( 'post' == $screen->base ) {
    99                         if ( 'post' == $screen->post_type || 'page' == $screen->post_type )
     99                        if ( 'post' == $screen->post_type || 'page' == $screen->post_type || 'attachment' == $screen->post_type )
    100100                                $hidden = array('slugdiv', 'trackbacksdiv', 'postcustom', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');
    101101                        else
    102102                                $hidden = array( 'slugdiv' );
  • wp-admin/post.php

     
    3131if ( $post ) {
    3232        $post_type = $post->post_type;
    3333        $post_type_object = get_post_type_object( $post_type );
     34        $parent_file = 'upload.php';
    3435}
    3536
    3637/**
     
    148149                $parent_file = "edit.php";
    149150                $submenu_file = "edit.php";
    150151                $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';
    151156        } else {
    152157                if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true )
    153158                        $parent_file = $post_type_object->show_in_menu;