*/ public static function all(): array { return [ self::GLOBAL => esc_html__('Global', 'daytidy'), self::OFFERING => esc_html__('Offering', 'daytidy'), ]; } /** * @return array */ public static function get(): array { $scopes = [ self::GLOBAL => esc_html__('Global', 'daytidy'), ]; return (array) apply_filters('DayTidy/F__DayTidy/Data/ResourceScopes__get/scopes', $scopes); } public static function normalize(string $scope): string { return array_key_exists($scope, self::all()) ? $scope : self::GLOBAL; } public static function enabled(string $scope): bool { return array_key_exists(self::normalize($scope), self::get()); } public static function label(string $scope): string { $scope = self::normalize($scope); $labels = self::all(); return $labels[$scope] ?? $scope; } }