Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to get plugin directory path in wordpress

//current path: /home/user/var/www/wordpress/wp-content/plugins/my-plugin/
$dir = plugin_dir_path( __DIR__ );
//$dir is set to /home/user/var/www/wordpress/wp-content/plugins/
Source by developer.wordpress.org #
 
PREVIOUS NEXT
Tagged: #plugin #directory #path #wordpress
ADD COMMENT
Topic
Name
2+6 =