Modifiche minori e per risoluzione issue

This commit is contained in:
ulaulaman 2021-06-30 10:37:43 +02:00
parent abcf961def
commit d774e98d34
1 changed files with 14 additions and 13 deletions

View File

@ -7,7 +7,8 @@ add_shortcode( 'sbcorsobase', function () {
$logo = '<p align="center"><img src="https://edu.inaf.it/wp-content/plugins/eduinaf/images/loghi/corso_base_astro.png" /></p>';
$autore = do_shortcode('[blog-post-coauthors]');
$autore = '<p><strong>Lezione a cura di</strong>: '.$autore.'</p>';
$breraNav = wp_get_nav_menu_items(1682);
foreach ( $breraNav as $navItem ) {
@ -17,20 +18,20 @@ add_shortcode( 'sbcorsobase', function () {
$menu = '<div align="center" class="btn-group">'.$nav.'</div>';
$custom = get_post_custom();
foreach( $custom as $key => $value ) {
$key_name = get_post_custom_values( $key = 'pdfcap' );
if ( $key_name[0] <> null ) {
$capitolo = '<p><a href="'.$key_name[0].'" target="pdf">Scarica la lezione in pdf</a></p>';
} else {
$capitolo = null;
if ( empty($custom) ) {
$capitolo = null;
} else {
foreach( $custom as $key => $value ) {
$key_name = get_post_custom_values( $key = 'pdfcap' );
if ( $key_name[0] <> null ) {
$capitolo = '<p><a href="'.$key_name[0].'" target="pdf">Scarica la lezione in pdf</a></p>';
} else {
$capitolo = null;
}
}
}
$cap = '<p><strong>Lezione a cura di</strong>: '.$autore.'</p>';
$sidebar = $logo.$cap.$capitolo.$menu;
$out = $sidebar;
$sidebar = $logo.$autore.$capitolo.$menu;
return $out;
return $sidebar;
} );