mirror of https://github.com/ulaulaman/eduinaf.git
Modifiche minori e per risoluzione issue
This commit is contained in:
parent
abcf961def
commit
d774e98d34
|
@ -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>';
|
$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 = do_shortcode('[blog-post-coauthors]');
|
||||||
|
$autore = '<p><strong>Lezione a cura di</strong>: '.$autore.'</p>';
|
||||||
|
|
||||||
$breraNav = wp_get_nav_menu_items(1682);
|
$breraNav = wp_get_nav_menu_items(1682);
|
||||||
|
|
||||||
foreach ( $breraNav as $navItem ) {
|
foreach ( $breraNav as $navItem ) {
|
||||||
|
@ -17,20 +18,20 @@ add_shortcode( 'sbcorsobase', function () {
|
||||||
$menu = '<div align="center" class="btn-group">'.$nav.'</div>';
|
$menu = '<div align="center" class="btn-group">'.$nav.'</div>';
|
||||||
|
|
||||||
$custom = get_post_custom();
|
$custom = get_post_custom();
|
||||||
foreach( $custom as $key => $value ) {
|
if ( empty($custom) ) {
|
||||||
$key_name = get_post_custom_values( $key = 'pdfcap' );
|
$capitolo = null;
|
||||||
if ( $key_name[0] <> null ) {
|
} else {
|
||||||
$capitolo = '<p><a href="'.$key_name[0].'" target="pdf">Scarica la lezione in pdf</a></p>';
|
foreach( $custom as $key => $value ) {
|
||||||
} else {
|
$key_name = get_post_custom_values( $key = 'pdfcap' );
|
||||||
$capitolo = null;
|
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.$autore.$capitolo.$menu;
|
||||||
|
|
||||||
$sidebar = $logo.$cap.$capitolo.$menu;
|
|
||||||
|
|
||||||
$out = $sidebar;
|
|
||||||
|
|
||||||
return $out;
|
return $sidebar;
|
||||||
} );
|
} );
|
Loading…
Reference in New Issue