hook(); } static::$inited = true; } /** * Call this method as many times as needed and the * class will only init() one time. * * @static * * @since 8.0.1 * * @return void */ public static function init_once() { if ( ! static::$inited ) { static::init(); } } /** * Get (and instantiate, if necessary) the instance of the * class * * @static * @return static */ public static function instance() { if ( ! is_a( static::$instance, __CLASS__ ) ) { /* @phpstan-ignore-next-line */ static::$instance = new static(); } return static::$instance; } }