Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
loads classes from a folder
/**
* Returns array of features, also
* Scans the plugins subfolder "/classes"
*
* @since 0.1
* @return void
*/
protected function load_classes() {
// load all files with the pattern *.php from the directory inc
foreach( glob( dirname( __FILE__ ) . '/inc/*.php' ) as $class ) {
require_once $class;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment