diff --git a/2019/template/header.php b/2019/template/header.php index 16b182a..9301d47 100644 --- a/2019/template/header.php +++ b/2019/template/header.php @@ -1,120 +1,120 @@ . /* * This is the header of the website */ /* * Args that should be passed: * * $title (string) Page title * $conference (object) Current conference * $intro (true|undefined) If true, you want that damn splash screen * $og (array) OG meta tags * $canonical (string) Canonical link tag */ // do not visit directly defined( 'ABSPATH' ) or exit; // site name $sitename = $conference->getConferenceTitle(); // page title (if any) $title = isset( $title ) ? $title : null; // page title $title_dashed = $sitename; if( isset( $title ) ) { $title_dashed = sprintf( __( "%s - %s" ), $title, $sitename ); } // canonical URL $canonical = isset( $canonical ) ? $canonical : null; // if the canonical is specified, and we have to force the permalink, force that damn permalink if( $canonical && FORCE_PERMALINK ) { force_permalink( $canonical ); } // as default declare empty OG Meta tags -if( ! isset( $args['og'] ) ) { - $args['og'] = []; +if( ! isset( $og ) ) { + $og = []; } // set default OG Meta tags -$args['og'] = array_replace( [ +$og = array_replace( [ 'url' => $canonical, 'image' => CURRENT_CONFERENCE_URL . '/images/linux-day-2019.png', // It's better an absolute URL here 'type' => 'website', 'title' => $title, -], $args['og'] ); +], $og ); ?> <?= esc_html( $title_dashed ) ?> "> - $value ): ?> + $value ): ?> $conference, 'top_nav_collapse' => !isset( $intro ), ] ); if( isset( $intro ) ) { template( 'intro' ); }