modifiche minori non salvate

This commit is contained in:
Gianluigi 2023-10-19 16:01:56 +02:00
parent 2c3302ba2f
commit 4962a015c9
1 changed files with 18 additions and 0 deletions

View File

@ -212,4 +212,22 @@ add_shortcode( 'sbdidattica', function () {
$outnew = $outnew.$licenza;
return $outnew;
} );
add_shortcode( 'livellodida', function () {
$livellodid = null;
$terms = get_the_terms ( $post->ID, 'livello_educativo' );
if ( empty($terms) ) {
$livellodid = null;
} else {
$numcat = sizeof( $terms );
foreach ( $terms as $term ) {
$term_link = get_term_link( $term, 'livello_educativo' );
$livellodid = $livellodid.'<a rel="tag" href="'.$term_link.'" title="Vedi tutte le attività del livello: '.$term->name.'"><img src="https://edu.inaf.it/wp-content/plugins/eduinaf/images/dida/'.$term->slug.'.png" width="25%" /></a>';
}
$img = $img.'<div>'.$livellodid.'</div>';
}
return $img;
} );