Fix get_base_path() method
-
Hello!
Could you fix the
get_base_path()method inGFCPTAddon? My error log is riddled with notices about this method being called statically when it is not declared as such. Meanwhile, the method uses theWP_PLUGIN_DIRconstant instead of just relying on where the file is situated. This is an understandable assumption, but some unconventional WordPress configurations may place plugins in a different directory than the default. Please consider updating the method as follows:
protected static function get_base_path(){
return __DIR__;
}
If you are concerned about supporting PHP <=5.2, you could replace
__DIR__withdirname(__FILE__).Thanks!
https://wordpress.org/plugins/gravity-forms-custom-post-types/
The topic ‘Fix get_base_path() method’ is closed to new replies.