I need to get the current plugin directory like:
[wordpress_install_dir]/wp-content/plugins/plugin_name
(If getcwd()
is called from the plugin, it returns [wordpress_install_dir]
, the root of installation.)
Looking at the OP's own answer, I think the OP wants;
$plugin_dir_path = dirname(__FILE__);