How do I get the plugins directory path while in my theme’s functions.php?
Suppose I have Contact form 7 installed and I want to load a file if a functions is undefined. This is what I have tried so far.
if ( ! function_exists( 'wpcf7_add_form_tag' ) ) {
require_once PLUGINDIR . '/contact-form-7/includes/form-tags-manager.php';
}
But it always returns path to wp-content, which is not right because all plugins reside in web/app/plugins folder.