How to determine wordpress base path when wordpress core is not loaded
I came up with this solution. This function checks in each directory level starting from the directory of the current file for the file wp-config.php. If it is found the directory is to be assumed the wordpress base path. The check can of course be changed to other wordpress core files. function find_wordpress_base_path() { $dir … Read more