Last active
November 3, 2018 20:22
-
-
Save corypina/9e20b27fd90f8b2e19c4ffdbffc29dac to your computer and use it in GitHub Desktop.
Include all PHP files in a folder, except those prepended with an underscore "_"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Include all PHP files in FOLDERNAME | |
| $dir = plugin_dir_path(__FILE__); | |
| foreach(glob($dir . "FOLDERNAME/[!_]*.php") as $file){ | |
| require $file; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment