# code-block-pro/1.28.0/src/util/themes.ts

Code Block Pro – Beautiful Syntax Highlighting, version 1.28.0. 25 lines.

- Page: https://pluginprobe.com/plugins/code-block-pro/1.28.0/code/src/util/themes.ts
- Raw: https://pluginprobe.com/plugins/code-block-pro/1.28.0/raw/src/util/themes.ts
- Modified: 2026-04-12T13:22:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-block-pro/1.28.0/code/src/util/themes.ts#L10-L20`.

```typescript
import { applyFilters } from '@wordpress/hooks';
import defaultThemes from '../defaultThemes.json';

const themes = () =>
	applyFilters('blocks.codeBlockPro.themes', defaultThemes) as Record<
		string,
		{ name: string; priority?: boolean; custom?: boolean }
	>;

const themesNormalized = () =>
	Object.entries(themes()).map(([slug, { name, priority, custom }]) => ({
		name,
		slug,
		priority,
		custom,
	}));
export const getPriorityThemes = () =>
	themesNormalized().filter(({ priority }) => priority);

export const getNormalThemes = () =>
	themesNormalized().filter(({ priority, custom }) => !priority && !custom);

export const getCustomThemes = () =>
	themesNormalized().filter(({ custom }) => custom);

```
