Make WordPress Core

Ticket #22085: 22085.2.diff

File 22085.2.diff, 913 bytes (added by nacin, 12 years ago)
  • wp-admin/includes/media.php

     
    383383 * @param string $editor_id
    384384 */
    385385function media_buttons($editor_id = 'content') {
     386        $post = get_post();
     387        if ( ! $post && ! empty( $GLOBALS['post_ID'] ) )
     388                $post = $GLOBALS['post_ID'];
     389
    386390        wp_enqueue_media( array(
    387                 'post' => get_post()
     391                'post' => $post
    388392        ) );
    389393
    390394        // $context = apply_filters('media_buttons_context', __('Upload/Insert %s'));
  • wp-includes/media.php

     
    13931393                'nonce'     => array(
    13941394                        'sendToEditor' => wp_create_nonce( 'media-send-to-editor' ),
    13951395                ),
     1396                'postId'    => 0,
    13961397        );
    13971398
    13981399        $post = null;