Docs and breathing room for get_media_buttons() and friends. see #14966.

git-svn-id: https://develop.svn.wordpress.org/trunk@15689 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-10-03 03:08:39 +00:00
parent ea2f90c70e
commit 6fd30d36ea
1 changed files with 31 additions and 18 deletions

View File

@ -1397,9 +1397,11 @@ function wp_oembed_add_provider( $format, $provider, $regex = false ) {
}
/**
* Generate HTML for the editor media buttons (image, video, audio).
*
* @since 3.1.0
*
*
* @return string HTML
*/
function get_media_buttons() {
$do_image = $do_audio = $do_video = true;
@ -1440,10 +1442,21 @@ function media_buttons() {
}
add_action( 'media_buttons', 'media_buttons' );
/**
* {@internal Missing Short Description}}
*
* @since unknown
* @access private
*/
function _media_button( $title, $icon, $type ) {
return "<a href='" . esc_url( get_upload_iframe_src( $type ) ) . "' id='add_$type' class='thickbox' title='$title'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' /></a>";
}
/**
* {@internal Missing Short Description}}
*
* @since unknown
*/
function get_upload_iframe_src( $type ) {
global $post_ID, $temp_ID;
$uploading_iframe_ID = (int) ( 0 == $post_ID ? $temp_ID : $post_ID );