Make WordPress Core


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).

File:
1 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();
Note: See TracChangeset for help on using the changeset viewer.