Make WordPress Core

Ticket #21654: media.php.diff

File media.php.diff, 860 bytes (added by CircaLucid, 12 years ago)

patch

  • media.php

    a b  
    382382
    383383        $img = '<img src="' . esc_url( admin_url( 'images/media-button.png?ver=20111005' ) ) . '" width="15" height="15" />';
    384384
    385         echo '<a href="' . esc_url( get_upload_iframe_src() ) . '" class="thickbox add_media" id="' . esc_attr( $editor_id ) . '-add_media" title="' . esc_attr__( 'Add Media' ) . '" onclick="return false;">' . sprintf( $context, $img ) . '</a>';
     385        $link = apply_filters('media_buttons_link', get_upload_iframe_src());
     386       
     387        $link = '<a href="' . esc_url( $link ) . '" class="thickbox add_media" id="' . esc_attr( $editor_id ) . '-add_media" title="' . esc_attr__( 'Add Media' ) . '" onclick="return false;">' . sprintf( $context, $img ) . '</a>';
     388       
     389        echo $link;
    386390}
    387391add_action( 'media_buttons', 'media_buttons' );
    388392