diff --git a/admin/includes/class-Header.php b/admin/includes/class-Header.php index 25cfd42..f5a6c07 100644 --- a/admin/includes/class-Header.php +++ b/admin/includes/class-Header.php @@ -1,203 +1,203 @@ . /** * Header of the website */ class Header { /** * Spawn the header * * @param $menu_uid string Menu entry UID (if any) or page title * @param $args array Header arguments */ public static function spawn( $menu_uid = null, $args = [] ) { $menu = $menu_uid ? menu_entry( $menu_uid ) : null; $args = array_replace( [ 'show-title' => true, 'nav-title' => SITE_NAME_SHORT, 'head-title' => null, 'title' => $menu ? $menu->name : null, 'url' => $menu ? keep_url_in_language( $menu->url ) : null, 'not-found' => false, 'user-navbar' => true, 'container' => true, 'alert' => null, 'alert.type' => null, 'noindex' => NOINDEX ], $args ); if( ! isset( $args['og'] ) ) { $args['og'] = []; } $args['og'] = array_replace( [ 'type' => 'website', 'url' => $args['url'], 'title' => $args['title'] ], $args['og'] ); if( $args['head-title'] === null ) { $args['head-title'] = sprintf( __("%s - %s"), $args['title'], $args['nav-title'] ); } // force the permalink to this URL if( $args['url'] && FORCE_PERMALINK ) { force_permalink( $args['url'] ); } // sent the proper content type and charset header('Content-Type: text/html; charset=' . CHARSET); // declare that this page was not found if( $args['not-found'] ) { http_response_code( 404 ); } // enqueue_css('materialize'); // enqueue_css('materialize.custom'); // enqueue_css('materialize.icons'); // enqueue_js('jquery'); // enqueue_js('materialize'); // Close header - Start $args['container'] && inject_in_module('footer', function() { ?> getISO(); ?> <?= esc_html( $args['head-title'] ) ?> $value): ?>