Skip to content

Instantly share code, notes, and snippets.

@scarstens
Created July 13, 2014 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scarstens/5cff6185909d3739492b to your computer and use it in GitHub Desktop.
Save scarstens/5cff6185909d3739492b to your computer and use it in GitHub Desktop.
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