mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 20:58:55 +00:00
Merge mu_media_buttons() into media_buttons(). see #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@12955 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -594,36 +594,6 @@ function mu_dropdown_languages( $lang_files = array(), $current = '' ) {
|
||||
echo implode("\n\t", $output);
|
||||
}
|
||||
|
||||
// Only show "Media" upload icon
|
||||
function mu_media_buttons() {
|
||||
global $post_ID, $temp_ID;
|
||||
$uploading_iframe_ID = (int) (0 == $post_ID ? $temp_ID : $post_ID);
|
||||
$context = apply_filters('media_buttons_context', __('Add media: %s'));
|
||||
$media_upload_iframe_src = "media-upload.php?post_id=$uploading_iframe_ID";
|
||||
$media_title = __('Add Media');
|
||||
$mu_media_buttons = get_site_option( 'mu_media_buttons' );
|
||||
$out = '';
|
||||
if ( $mu_media_buttons[ 'image' ] ) {
|
||||
$image_upload_iframe_src = apply_filters('image_upload_iframe_src', "$media_upload_iframe_src&type=image");
|
||||
$image_title = __('Add an Image');
|
||||
$out .= "<a href='{$image_upload_iframe_src}&TB_iframe=true' id='add_image' class='thickbox' title='$image_title'><img src='images/media-button-image.gif' alt='$image_title' /></a>";
|
||||
}
|
||||
if ( $mu_media_buttons[ 'video' ] ) {
|
||||
$video_upload_iframe_src = apply_filters('video_upload_iframe_src', "$media_upload_iframe_src&type=video");
|
||||
$video_title = __('Add Video');
|
||||
$out .= "<a href='{$video_upload_iframe_src}&TB_iframe=true' id='add_video' class='thickbox' title='$video_title'><img src='images/media-button-video.gif' alt='$video_title' /></a>";
|
||||
}
|
||||
if ( $mu_media_buttons[ 'audio' ] ) {
|
||||
$audio_upload_iframe_src = apply_filters('audio_upload_iframe_src', "$media_upload_iframe_src&type=audio");
|
||||
$audio_title = __('Add Audio');
|
||||
$out .= "<a href='{$audio_upload_iframe_src}&TB_iframe=true' id='add_audio' class='thickbox' title='$audio_title'><img src='images/media-button-music.gif' alt='$audio_title' /></a>";
|
||||
}
|
||||
$out .= "<a href='{$media_upload_iframe_src}&TB_iframe=true&height=500&width=640' class='thickbox' title='$media_title'><img src='images/media-button-other.gif' alt='$media_title' /></a>";
|
||||
printf($context, $out);
|
||||
}
|
||||
add_action( 'media_buttons', 'mu_media_buttons' );
|
||||
remove_action( 'media_buttons', 'media_buttons' );
|
||||
|
||||
/* Warn the admin if SECRET SALT information is missing from wp-config.php */
|
||||
function secret_salt_warning() {
|
||||
if ( !is_super_admin() )
|
||||
|
||||
Reference in New Issue
Block a user