theme_{$post_type}_templates

theme_{$post_type}_templates

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.4.3

apply_filters('theme_{$post_type}_templates') is found 1 times:

  • /wp-includes/class-wp-theme.php line 1427
    		 * @param WP_Theme     $theme          The theme object.
    		 * @param WP_Post|null $post           The post being edited, provided for context, or null.
    		 * @param string       $post_type      Post type to get the templates for.
    		 */
    		$post_templates = (array) apply_filters( "theme_{$post_type}_templates", $post_templates, $this, $post, $post_type );
    
    		return $post_templates;
    	}
    
    	/**
    	 * Scans a directory for files of a certain extension.
    

See this hook used in plugins: