the_media_upload_tabs

The timeline below displays how wordpress function the_media_upload_tabs has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.4

/**
 * Outputs the legacy media upload tabs UI.
 *
 * @since 2.5.0
 *
 * @global string $redir_tab
 */
function the_media_upload_tabs()
{
    global $redir_tab;
    $tabs = media_upload_tabs();
    $default = 'type';
    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 {
            /** This filter is documented in wp-admin/media-upload.php */
            $current = apply_filters('media_upload_default_tab', $default);
        }
        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";
    }
}

WordPress Version: 4.3

/**
 * {@internal Missing Short Description}}
 *
 * @since 2.5.0
 *
 * @global string $redir_tab
 */
function the_media_upload_tabs()
{
    global $redir_tab;
    $tabs = media_upload_tabs();
    $default = 'type';
    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 {
            /** This filter is documented in wp-admin/media-upload.php */
            $current = apply_filters('media_upload_default_tab', $default);
        }
        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";
    }
}

WordPress Version: 3.9

/**
 * {@internal Missing Short Description}}
 *
 * @since 2.5.0
 */
function the_media_upload_tabs()
{
    global $redir_tab;
    $tabs = media_upload_tabs();
    $default = 'type';
    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 {
            /** This filter is documented in wp-admin/media-upload.php */
            $current = apply_filters('media_upload_default_tab', $default);
        }
        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";
    }
}

WordPress Version: 3.7

/**
 * {@internal Missing Short Description}}
 *
 * @since 2.5.0
 */
function the_media_upload_tabs()
{
    global $redir_tab;
    $tabs = media_upload_tabs();
    $default = 'type';
    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', $default);
        }
        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";
    }
}