Home
function zg_post_buttons()
	{
	global $post_ID, $temp_ID;

	$uploading_iframe_ID = (int) (0 == $post_ID ? $temp_ID : $post_ID);

	$generic_title = 'Upload/Insert';

	$media_upload_iframe_src = "media-upload.php?post_id=$uploading_iframe_ID";
	$media_title = 'Add Media';
	$media_button = '<a href="' . $media_upload_iframe_src . '&TB_iframe=true" id="add_media" title="' . $media_title . '" onclick="return false;"><img src="images/media-button-other.gif" alt="' . $media_title . '" /></a>';

	$video_upload_iframe_src = apply_filters('video_upload_iframe_src', "$media_upload_iframe_src&type=video");
	$video_title = 'Add Video';
	$video_button = '<a href="' . $video_upload_iframe_src . '&TB_iframe=true" id="add_video" title="' . $video_title . '" onclick="return false;"><img src="images/media-button-video.gif" alt="' . $video_title . '" /></a>';

	$audio_upload_iframe_src = apply_filters('audio_upload_iframe_src', "$media_upload_iframe_src&type=audio");
	$audio_title = 'Add Audio';
	$audio_button = '<a href="' . $audio_upload_iframe_src . '&TB_iframe=true" id="add_audio" title="' . $audio_title . '" onclick="return false;"><img src="images/media-button-music.gif" alt="' . $audio_title . '" /></a>';

	$image_upload_iframe_src = apply_filters('image_upload_iframe_src', "$media_upload_iframe_src&type=image");
	$image_title = 'Add an Image';
	$image_button = '<a href="' . $image_upload_iframe_src . '&TB_iframe=true" id="add_image" title="' . $image_title . '" onclick="return false;"><img src="images/media-button-image.gif" alt="' . $image_title . '" /></a>';

	return $image_title . ':' . $image_button;
	}

add_action('media_buttons_context','zg_post_buttons');
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s