Skip to content

Instantly share code, notes, and snippets.

@amans199
Last active October 31, 2020 16:55
Show Gist options
  • Save amans199/890808893ee1bb5ac47c10a8bee5ae3a to your computer and use it in GitHub Desktop.
Save amans199/890808893ee1bb5ac47c10a8bee5ae3a to your computer and use it in GitHub Desktop.
Wordpress_Hints:: including all files inside a directory
define('DEFAULT_PATH', plugin_dir_path(__FILE__));
foreach (glob(DEFAULT_PATH . "templates/*.php") as $file) {
include_once $file;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment