Deprecate and stub _media_button. fixes #21317

git-svn-id: http://core.svn.wordpress.org/trunk@21353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2012-07-26 21:33:01 +00:00
parent 1c175f829e
commit 44ef6d8e80
2 changed files with 9 additions and 4 deletions

View File

@ -948,3 +948,12 @@ function current_theme_info() {
function _insert_into_post_button( $type ) { function _insert_into_post_button( $type ) {
_deprecated_function( __FUNCTION__, '3.5' ); _deprecated_function( __FUNCTION__, '3.5' );
} }
/**
* This was once used to display a media button. Now it is deprecated and stubbed.
*
* @deprecated 3.5.0
*/
function _media_button($title, $icon, $type, $id) {
_deprecated_function( __FUNCTION__, '3.5' );
}

View File

@ -386,10 +386,6 @@ function media_buttons($editor_id = 'content') {
} }
add_action( 'media_buttons', 'media_buttons' ); add_action( 'media_buttons', 'media_buttons' );
function _media_button($title, $icon, $type, $id) {
return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' id='{$id}-add_{$type}' class='thickbox add_$type' title='" . esc_attr( $title ) . "'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' onclick='return false;' /></a>";
}
function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) { function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) {
global $post_ID; global $post_ID;