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,6 +7,7 @@ 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);
@ -17,6 +18,9 @@ add_shortcode( 'sbcorsobase', function () {
$menu = '<div align="center" class="btn-group">'.$nav.'</div>';
$custom = get_post_custom();
if ( empty($custom) ) {
$capitolo = null;
} else {
foreach( $custom as $key => $value ) {
$key_name = get_post_custom_values( $key = 'pdfcap' );
if ( $key_name[0] <> null ) {
@ -25,12 +29,9 @@ add_shortcode( 'sbcorsobase', function () {
$capitolo = null;
}
}
}
$cap = '<p><strong>Lezione a cura di</strong>: '.$autore.'</p>';
$sidebar = $logo.$autore.$capitolo.$menu;
$sidebar = $logo.$cap.$capitolo.$menu;
$out = $sidebar;
return $out;
return $sidebar;
} );