diff --git a/2019/template/header.php b/2019/template/header.php index 38f5084..8bd7b92 100644 --- a/2019/template/header.php +++ b/2019/template/header.php @@ -1,99 +1,104 @@ . /* * This is the header of the website */ /* * Args that should be passed: * * $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; // 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'] = []; } // set default OG Meta tags $args['og'] = array_replace( [ 'url' => $canonical, 'image' => CURRENT_CONFERENCE_URL . '/images/linux-day-2019.png', // It's better an absolute URL here 'type' => 'website', 'title' => $conference->getConferenceTitle(), ], $args['og'] ); ?> <?= esc_html( $conference->getConferenceTitle() ) ?> "> $value ): ?> $conference, 'top_nav_collapse' => !isset( $intro ), ] ); if( isset( $intro ) ) { template( 'intro' ); }