'; $terms = get_the_terms( $post->ID, 'livello_educativo' ); $numcat = sizeof( $terms ); foreach ( $terms as $term ) { $term_link = get_term_link( $term, 'livello_educativo' ); $img = $img.''; } $type = null; $terms = get_the_terms ( $post->ID, 'tipologia_contenuto' ); $numcat = sizeof( $terms ); $i = 0; foreach ( $terms as $term ) { $term_link = get_term_link( $term, 'tipologia_contenuto' ); $i++; if ( $i < $numcat ) { $type = $type.', '; } else { $type = $type.''; } } $auth = null; $custom = get_post_custom(); foreach( $custom as $key => $value ) { $key_name = get_post_custom_values( $key = 'autore_attivita' ); if ( $key_name[0] <> null ) { $auth1 = ''.$key_name[0].''; } else { $auth1 = null; } if ( $key_name[1] <> null ) { $auth2 = ', '.$key_name[1].''; } else { $auth2 = null; } if ( $key_name[2] <> null ) { $auth3 = ', '.$key_name[2].''; } else { $auth3 = null; } if ( $key_name[3] <> null ) { $auth4 = ', '.$key_name[3].''; } else { $auth4 = null; } $auth = $auth1.$auth2.$auth3.$auth4; } if ( $auth == null ) { $terms = get_the_terms ( $post->ID, 'autore_didattico' ); $numcat = sizeof( $terms ); $i = 0; foreach ( $terms as $term ) { $term_link = get_term_link( $term, 'autore_didattico' ); $i++; if ( $i < $numcat ) { $auth = $auth.', '; } else { $auth = $auth.''; } } } $auth = 'di '.$auth; $curriculum = null; $curriculumastro = null; $terms = get_the_terms ( $post->ID, 'argomento_astro' ); $numcat = sizeof( $terms ); $i = 0; foreach ( $terms as $term ) { $term_link = get_term_link( $term, 'argomento_astro' ); $i++; if ( $i < $numcat ) { $curriculumastro = $curriculumastro.', '; } else { $curriculumastro = $curriculumastro.''; } } $curriculumsteam = null; $terms = get_the_terms ( $post->ID, 'argomento_steam' ); $numcat = sizeof( $terms ); $i = 0; foreach ( $terms as $term ) { $term_link = get_term_link( $term, 'argomento_steam' ); $i++; if ( $i < $numcat ) { $curriculumsteam = $curriculumsteam.', '; } else { $curriculumsteam = $curriculumsteam.''; } } $curriculum = 'Argomenti dal curriculum scolastico:'; if ( $curriculumastro <> 'null' ) { $curriculum = '

'.$curriculum.'
'.$curriculumastro; } if ( $curriculumsteam <> 'null' ) { $curriculum = $curriculum.', '.$curriculumsteam.'

'; } else { $curriculum = $curriculum.'

'; } $keyw = 'Parole chiave: '; $terms = get_the_terms ( $post->ID, 'parole_chiave' ); $numcat = sizeof( $terms ); $i = 0; foreach ( $terms as $term ) { $term_link = get_term_link( $term, 'parole_chiave' ); $i++; if ( $i < $numcat ) { $keyw = $keyw.', '; } else { $keyw = $keyw.''; } } $livello = 'Livello: '; $terms = get_the_terms ( $post->ID, 'livello_educativo' ); $numcat = sizeof( $terms ); $i = 0; foreach ( $terms as $term ) { $term_link = get_term_link( $term, 'livello_educativo' ); $i++; if ( $i < $numcat ) { $livello = $livello.', '; } else { $livello = $livello.''; } } $durata = null; if ( has_term( 'Percorso didattico', 'tipologia_contenuto' ) ) { $durata = null; } else { $terms = get_the_terms ( $post->ID, 'durata_attivita' ); foreach ( $terms as $term ) { $term_link = get_term_link( $term, 'durata_attivita' ); $durata = 'Durata: '; } } $supervisione = null; if ( has_term( 'Scheda didattica', 'tipologia_contenuto' ) || has_term( 'Laboratorio didattico', 'tipologia_contenuto' ) ) { $terms = get_the_terms ( $post->ID, 'supervisione' ); foreach ( $terms as $term ) { $term_link = get_term_link( $term, 'supervisione' ); $supervisione = $term->name; } } else { $supervisione = null; } $costo = null; if ( has_term( 'Scheda didattica', 'tipologia_contenuto' ) || has_term( 'Laboratorio didattico', 'tipologia_contenuto' ) ) { $terms = get_the_terms ( $post->ID, 'costo_attivita' ); foreach ( $terms as $term ) { $term_link = get_term_link( $term, 'costo_attivita' ); $costo = $term->name; } } else { $costo = null; } $outnew = $img.'

'.$type.' '.$auth.'

'.$curriculum.'

'.$keyw.'

'.$livello.'

'; if ( $durata <> 'null' ) { $outnew = $outnew.'

'.$durata.'

'; } else { $outnew = $outnew; } if ( $supervisione <> 'null' ) { $outnew = $outnew.'

'.$supervisione.'

'; } else { $outnew = $outnew; } if ( has_term( 'Percorso didattico', 'tipologia_contenuto' ) || has_term( 'Video didattico', 'tipologia_contenuto' ) || has_term( 'Video rubriche', 'tipologia_contenuto' ) ) { $outnew = $outnew; } else { $outnew = $outnew.'

Costo: '.$costo.'

'; } $collaborazione = null; $terms = get_the_terms ( $post->ID, 'collaborazioni' ); $numcat = sizeof( $terms ); $i = 0; foreach ( $terms as $term ) { $term_link = get_term_link( $term, 'collaborazioni' ); $i++; if ( $i < $numcat ) { $ente = $ente.'
'; } else { $ente = $ente.''; } } if ( $i <> 0 ) { $collaborazione = '

In collaborazione con:
'.$ente.'

'; $outnew = $outnew.$collaborazione; } else { $outnew = $outnew; } $licenza = '


Quest\'opera è distribuita con Licenza Creative Commons Attribuzione - Non commerciale 4.0 Internazionale.'; $outnew = $outnew.$licenza; $out = $img; return $outnew; } );