Clanbite Extensions

apply_filters( 'clanbite_extension_{slug}_templates', array<string, array<string, string>> $templates, Skeleton $extension )

Filter templates for a specific extension.

Template array shape: – key: template slug (without namespace), e.g. "player-settings" – value: [ 'title' => 'Template Title', 'path' => '/absolute/path/to/template.php', 'description' => 'Optional. Shown in the Site Editor.', 'post_types' => array( 'post' ), // Optional. WP 6.7+ plugin templates only. ]

Filter PHP

Parameters

$templates (array<string, array<string, string>>)

Template definitions.

$extension (Skeleton)

Extension object.

Example

add_filter( 'clanbite_extension_{slug}_templates', function ( $templates, $extension ) {
	// Change $templates here.
	return $templates;
}, 10, 2 );

Defined in inc/extensions/class-extension-skeleton.php