queue as $handle ) { $handle = (string) $handle; if ( str_starts_with( $handle, 'rooster-lms' ) && ! in_array( $handle, self::ON_INTENT, true ) ) { self::$needed[ $handle ] = true; } } return $content; } public static function queue_missing(): void { foreach ( self::missing() as $handle ) { wp_enqueue_style( $handle ); } } public static function print_missing(): void { $missing = self::missing(); if ( array() !== $missing ) { wp_styles()->do_items( $missing ); } } public static function missing(): array { $styles = wp_styles(); $out = array(); foreach ( array_keys( self::$needed ) as $handle ) { if ( isset( $styles->registered[ $handle ] ) && ! $styles->query( $handle, 'done' ) && ! $styles->query( $handle, 'enqueued' ) ) { $out[] = $handle; } } return $out; } public static function reset(): void { self::$needed = array(); self::$front = false; } }