Advertisements

the_media_upload_tabs

Definition:
function the_media_upload_tabs() {}

Defined filters

  • media_upload_default_tab
    apply_filters('media_upload_default_tab', 'type')

Source code

function the_media_upload_tabs() {

	global $redir_tab;

	$tabs = media_upload_tabs();



	if ( !empty($tabs) ) {

		echo "<ul id='sidemenu'>\n";

		if ( isset($redir_tab) && array_key_exists($redir_tab, $tabs) )

			$current = $redir_tab;

		elseif ( isset($_GET['tab']) && array_key_exists($_GET['tab'], $tabs) )

			$current = $_GET['tab'];

		else

			$current = apply_filters('media_upload_default_tab', 'type');



		foreach ( $tabs as $callback => $text ) {

			$class = '';

			if ( $current == $callback )

				$class = " class='current'";

			$href = add_query_arg(array('tab'=>$callback, 's'=>false, 'paged'=>false, 'post_mime_type'=>false, 'm'=>false));

			$link = "<a href='" . esc_url($href) . "'$class>$text</a>";

			echo "\t<li id='" . esc_attr("tab-$callback") . "'>$link</li>\n";

		}

		echo "</ul>\n";

	}

}

3019

Advertisements

No comments yet... Be the first to leave a reply!

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

%d bloggers like this: