No products in the cart.
Forum Replies Created
Viewing 1 post (of 1 total)
- AuthorPosts
-
omry-yadan
ParticipantNote: This answer is really old and things may have changed in WordPress land since.
I am guessing that you need to detect the WordPress root from your plugin or theme.
I use the following code in FireStats to detect the root WordPress directory where FireStats is installed a a WordPress plugin.function fs_get_wp_config_path() { $base = dirname(__FILE__); $path = false; if (@file_exists(dirname(dirname($base))."/wp-config.php")) { $path = dirname(dirname($base))."/wp-config.php"; } else if (@file_exists(dirname(dirname(dirname($base)))."/wp-config.php")) { $path = dirname(dirname(dirname($base)))."/wp-config.php"; } else $path = false; if ($path != false) { $path = str_replace("\\", "/", $path); } return $path; }
- AuthorPosts
Viewing 1 post (of 1 total)