Have you tried this:
$dir = plugin_dir_path(__FILE__) . 'lib/meta-box';
define('RWMB_DIR', $dir);
Question
I am using the Meta Box plugin from Delux Blog Tips (http://www.deluxeblogtips.com/meta-box/) and need to change the defined constants in the plugin. I need to do this because I am using the plugin inside a plugin and not a theme.
I have placed the plugin inside a folder called "lib/meta-box
" which is inside my plugin directory.
Using the WordPress "plugin_dir_path()
" function I need to define the path to the above folder.
I have tried this:
define('RWMB_DIR', plugin_dir_path(__FILE__));
but this doesn't include the "lib/meta-box
" directory.
The file defining the constant is located in the root of the plugin directory.
Thanks
Solution
Have you tried this:
$dir = plugin_dir_path(__FILE__) . 'lib/meta-box';
define('RWMB_DIR', $dir);