Loading all files within a directory
Loading files from a directory – the historical way The glob() function has three possible return values: Array( filenames ) => success Array() empty => nothing found FALSE => Error So the correct check would be $files = glob( sprintf( ‘%s/postypes/*.php’, get_stylesheet_directory() ) ); if ( empty( $files ) { _e( ‘No PHP files found’, … Read more