Accueil > Les artistes >

Les grands noms de la chanson sur Clipbox.fr

Les grands noms de la chanson sur Clipbox.fr

[php]
$valid_characters = range( ‘a’ , ‘z’ );
$valid_numbers = array(1,2,3,4,5,6,7,8,9,0);

$nav = array();
// Build nav array
foreach( $valid_characters as $key => $character )
$nav[] = ‘ID ) . ‘?tags=’ . $number . ‘ »>’ . $number . ‘‘;

// Array to hold tags, needs to be set, so the empty check works when none of the switch cases hit a match (for whatever reason)
$tags = array();
// Array that will hold arrays of tags based on their first letter
$tag_array = array();

// Main switch
switch( true ) {
// If request for tag with particular letter
case ( isset( $_GET[‘tags’] ) ):
// If it’s in the arrays created earlier, get tafs and sort into array
case ( in_array( $_GET[‘tags’] , $valid_characters ) || in_array( $_GET[‘tags’] , $valid_numbers ) ):
$tags = get_terms( ‘post_tag’ , « hide_empty=0&name__like=$_GET[tags] » );

if( !empty( $tags ) ) {
foreach( $tags as $tag ) {
$tag_array[$tag->name{0}][] = ‘

term_id ).' »>’.$tag->name.’

‘;
}
}
break;
}
// If theres only one item in the array ( well one key ) , then it’s a requested tag letter, so add a « Show all » link at the start of the nav
if( count( $tag_array ) == 1 ) array_unshift( $nav , ‘

La liste des artistes

$character_tags ) {
?>

$tag ) { echo $tag; } ?>

No tags found