Fix prepending $editor_id to the Add Media link, see #17578

git-svn-id: http://svn.automattic.com/wordpress/trunk@18918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-10-07 19:12:55 +00:00
parent 18630a3d5a
commit 7672731d95

View File

@ -378,7 +378,7 @@ function media_buttons($editor_id = 'content') {
$img = '<img src="' . esc_url( admin_url( 'images/media-button.png?ver=20111005' ) ) . '" width="15" height="15" />';
echo '<a href="' . esc_url( get_upload_iframe_src() ) . '" class="thickbox add_media" id="$editor_id-add_media" title="' . esc_attr__( 'Add Media' ) . '" onclick="return false;">' . sprintf( $context, $img ) . '</a>';
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>';
}
add_action( 'media_buttons', 'media_buttons' );