public static function loadThemeTemplates($post_templates, $object = null, $post = null, $post_type = null)
    {
        $blades = self::getAllBlades();
        foreach ($blades as $blade) {
            if (preg_match('/{{--\s*Template Name:(.*)--}}/mi', file_get_contents($blade), $header)) {

                $post_templates[basename($blade, ".blade.php")] = $header[1];
            }
        }
        return $post_templates;
    }
public static function loadThemeTemplates($post_templates, $object = null, $post = null, $post_type = null)
    {
        $blades = self::getAllBlades();
        foreach ($blades as $blade) {
            if (preg_match('/{{--\s*Template Name:(.*)--}}/mi', file_get_contents($blade), $header)) {

                $post_templates[basename($blade, ".blade.php")] = $header[1];
            }
        }
        return $post_templates;
    }
public static function loadThemeTemplates ( $ post_templates , $ object = null , $ post = null , $ post_type = null ) { $ blades = self :: getAllBlades ( ) ; foreach ( $ blades as $ blade ) { if ( preg_match ( '/{{--\s*Template Name:(.*)--}}/mi' , file_get_contents ( $ blade ) , $ header ) ) { $ post_templates [ basename ( $ blade , ".blade.php" ) ] = $ header [ 1 ] ; } } return $ post_templates ; }
Load custom template files
Load custom template files