Created
May 30, 2014 16:27
-
-
Save mircobabini/9ee1eacc239232adb25b to your computer and use it in GitHub Desktop.
Better ways to get the plugins dir path in WordPress?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* @author mircobabini | |
* @license GPLv2 | |
*/ | |
function plugins_dir_path(){ | |
return untrailingslashit( ABSPATH ) . str_replace( get_site_url(), '', plugins_url() ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment