芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/ebpt.pulsehost.co.uk/wp-content/plugins/lte-ext/inc/post-cats.php
$taxonomy, 'orderby' => $orderby, 'show_count' => $show_count, 'pad_counts' => $pad_counts, 'hierarchical' => $hierarchical, 'title_li' => $title, 'hide_empty' => $empty ); $cats = array(); $all_categories = get_categories( $args ); foreach ($all_categories as $cat) { if (esc_html($cat->name) == 'Uncategorized' OR empty($cat->name) ) continue; if ($cat->category_parent == 0) { $cats[$cat->term_id]['href'] = get_term_link($cat->slug, $taxonomy); $cats[$cat->term_id]['name'] = $cat->name; } else { $cats[$cat->category_parent]['child'][$cat->term_id] = array( 'href' => get_term_link($cat->slug, $taxonomy), 'name' => $cat->name, ); } } wp_reset_postdata(); return $cats; } } if (!function_exists('lteGetGalleryPosts')) { function lteGetGalleryPosts() { $posts = get_posts( array( 'nopaging' => true, 'post_type' => 'gallery', 'posts_per_page' => 100, ) ); $cat = array(); if ( !empty($posts) ) { foreach ( $posts as $post ) { $cat[$post->ID] = $post->post_title; } } wp_reset_postdata(); return $cat; } }