Are there any native WP functions that are able to list files based by extension from a directory?
if not, how do I do this with php?
I want to get the file names of all .css files from a certain folder
Are there any native WP functions that are able to list files based by extension from a directory?
if not, how do I do this with php?
I want to get the file names of all .css files from a certain folder
You must be logged in to post a comment.
Use
glob
like so:I don’t know about wordpress
But in PHP, you want the glob command – http://php.net/glob
Check out the glob function