`includes/Foo/Bar.php` $candidates = array( AFROMEWO_PLUGIN_DIR . 'includes/' . $relative . '.php', ); foreach ( $candidates as $file ) { if ( file_exists( $file ) ) { require_once $file; return; } } } }