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.8.2

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

  • /wp-includes/class-wp-theme.php line 1434
    1430
    1431
    1432
    1433
    1434
    1435
    1436
    1437
    1438
    1439
    1440
         * @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: