Make WordPress Core

Changeset 22735


Ignore:
Timestamp:
11/20/2012 11:22:03 PM (12 years ago)
Author:
nacin
Message:

Media: For pages, use 'Insert into page' rather than 'Insert into post'.

Custom post types can use the media_view_strings filter. No new post type "labels" for now.

see #22712. see #21092 (and #19696).

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r22725 r22735  
    1515if ( wp_is_mobile() )
    1616    wp_enqueue_script( 'jquery-touch-punch' );
    17 
    18 if ( post_type_supports($post_type, 'editor') || post_type_supports($post_type, 'thumbnail') ) {
    19     add_thickbox();
    20     wp_enqueue_media();
    21 }
    2217
    2318/**
     
    2924$user_ID = isset($user_ID) ? (int) $user_ID : 0;
    3025$action = isset($action) ? $action : '';
     26
     27if ( post_type_supports($post_type, 'editor') || post_type_supports($post_type, 'thumbnail') ) {
     28    add_thickbox();
     29    wp_enqueue_media( array( 'post' => $post_id ) );
     30}
    3131
    3232$messages = array();
  • trunk/wp-includes/media.php

    r22712 r22735  
    13351335    }
    13361336
     1337    $hier = $post && is_post_type_hierarchical( $post->post_type );
     1338
    13371339    $strings = array(
    13381340        // Generic
     
    13551357        'mediaLibraryTitle' => __( 'Media Library' ),
    13561358        'createNewGallery'  => __( 'Create a new gallery' ),
    1357         'insertIntoPost'    => __( 'Insert into post' ),
     1359        'insertIntoPost'    =>  $hier ? __( 'Insert into page' ) : __( 'Insert into post' ),
    13581360        'returnToLibrary'   => __( '← Return to library' ),
    13591361
    13601362        'allMediaItems'      => __( 'All media items' ),
    1361         'uploadedToThisPost' => __( 'Uploaded to this post' ),
     1363        'uploadedToThisPost' => $hier ? __( 'Uploaded to this page' ) : __( 'Uploaded to this post' ),
    13621364        'images'             => __( 'Images' ),
    13631365        'audio'              => __( 'Audio' ),
Note: See TracChangeset for help on using the changeset viewer.