- dirname: documentation ( source)
- glob: documentation ( source)
- touch: documentation ( source)
<?php
touch(dirname(__FILE__) . '/post-types/foo.php');
touch(dirname(__FILE__) . '/post-types/bar.php');
if ($post_types = glob(dirname(__FILE__) . '/post-types/*.php'))
foreach ($post_types as $post_type)
echo $post_type;