$cat->name, 'slug' => $cat->slug, 'link' => get_category_link($c) );
}
return $cats;
}
function antonine_get_categories_links($id){
$html = array();
$cats = antonine_get_categories($id);
foreach($cats as $cat){
$html[] = "" . $cat['name'] . "";
}
if(count($html)==0){
$html[] = __("No Categories", "antonine");
}
return $html;
}
function antonine_get_tags($id){
$post_tags = wp_get_post_tags($id);
$cats = array();
foreach($post_tags as $c){
$cat = get_tag( $c );
$cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug, 'link' => get_tag_link($c) );
}
return $cats;
}
function antonine_get_tags_links($id){
$html = array();
$cats = antonine_get_tags($id);
foreach($cats as $cat){
$html[] = "span property='subject'>" . $cat['name'] . "";
}
if(count($html)==0){
$html[] = __("No Tags", "antonine");
}
return $html;
}
function antonine_author_meta() {
global $post;
?>
ID)); ?>
term_id;
}
?> $id, 'posts_per_page' => -1) );
$authors = array();
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
$authors[] = get_the_author_meta('ID');
}
}
wp_reset_postdata();
return $authors;
}
function antonine_posts_authors_html($type, $id){
$authors = array_unique(antonine_posts_authors_list($type, $id));
$output = array();
foreach($authors as $author){
$output[] = "" . ucfirst(get_the_author_meta( 'display_name', $author )) . "";
}
echo implode(" / ", $output);
}