Filter: clarkson_core_templates_types_for_{$name}

apply_filters( 'clarkson_core_templates_types_for_{$name}', $post_types ) → {Array.<string>}

Manipulate which post_types get a template in the template dropdown.
Parameters:
Name Type Description
$post_types Array.<string> Which post types the template can be chosen on. By default showns only on 'page'.
Since:
  • 0.2.1
Source:
Returns:
Post type slugs that show the template in the template dropdown.
Type
Array.<string>
Example
// Show a custom template in the 'post' post-type template dropdown.
add_filter( 'clarkson_core_templates_types_for_template-sponsored_post.twig', function($post_types){
 $post_types[] = 'post';
 return $post_types;
} );