); /** * Filter the section data after it's built. * * @since 6.8.0 * * @param array $section The section data. * @param string $slug The section slug. */ $section = apply_filters( 'tec_help_hub_section', $section, $this->slug ); // Store the section. self::$sections[ $this->slug ] = $section; return $section; } /** * Get all built sections. * * @since 6.8.0 * * @return array All built sections. */ public static function get_all_sections(): array { return self::$sections; } /** * Get a specific section by slug. * * @since 6.8.0 * * @param string $slug The section slug. * * @return array|null The section data or null if not found. */ public static function get_section( string $slug ): ?array { return self::$sections[ $slug ] ?? null; } /** * Clear all stored sections. * * @since 6.8.0 * * @return void */ public static function clear_sections(): void { self::$sections = []; } }