Wordpress get plugin directory
wordpress
Solution
Yeah as per description of plugin_dir_path it will give you current plugin file path. But as per what you asking here you can do something like below unfortunately no direct way,
$plugin_dir = ABSPATH . 'wp-content/plugins/plugin-folder/';
Edit: 18-09-2021
The best practice is to use with latest version is WP_PLUGIN_DIR as follow:
$plugin_dir = WP_PLUGIN_DIR . '/plugin-folder';
Problem
Is there any function that would return the full path of my plugin in WordPress? Example is ``` path/wp-contents/plugins/myplugin ``` I have tried `plugin_dir_path(__FILE__)` but returns the current dir.