File: /www/wwwroot/www.scdc-marine.com/wp-content/themes/scdc-marine/HekuClass/View/Header.php
<?php
namespace Heku\HekuClass\View;
/**
* @package Heku\HekuClass\View
* @subpackage Classes/Header
* @author Heku Daleconan <http://www.daleconan.com>
* @copyright Copyright (c) 2022-2023, Heku Daleconan
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/
class Header {
/**
* 类实现单例模式,类的独生子女
*/
private static $instance;
/**
* 依赖注入的接口 Instance 方法
* 目标是 保证 init() 初始化方法 只执行一次
*
* @return self 唯一实例化的本类
*/
public static function instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self;
self::$instance->init();
}
return self::$instance;
}
private function init() {
// add_action( 'heku_head_css', array( $this, 'heku_head_css_html' ), 10 );
// add_action( 'wp_enqueue_scripts', array( $this, 'heku_head_js' ), 101 );
}
// /**
// * 输出缓存的header html 否则直接返回执行结果
// */
// public function heku_head_css_html(){
// if(is_single()){
// wp_enqueue_style( 'custom-script22', HEKU_THEME_URI . '/Assets/css/tocbot.css' );
// }
// }
}