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:
parent
ea2f90c70e
commit
6fd30d36ea
@ -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() {
|
function get_media_buttons() {
|
||||||
$do_image = $do_audio = $do_video = true;
|
$do_image = $do_audio = $do_video = true;
|
||||||
@ -1440,10 +1442,21 @@ function media_buttons() {
|
|||||||
}
|
}
|
||||||
add_action( 'media_buttons', 'media_buttons' );
|
add_action( 'media_buttons', 'media_buttons' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@internal Missing Short Description}}
|
||||||
|
*
|
||||||
|
* @since unknown
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
function _media_button( $title, $icon, $type ) {
|
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>";
|
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 ) {
|
function get_upload_iframe_src( $type ) {
|
||||||
global $post_ID, $temp_ID;
|
global $post_ID, $temp_ID;
|
||||||
$uploading_iframe_ID = (int) ( 0 == $post_ID ? $temp_ID : $post_ID );
|
$uploading_iframe_ID = (int) ( 0 == $post_ID ? $temp_ID : $post_ID );
|
||||||
|
Loading…
Reference in New Issue
Block a user