Smarter wp-load.php Checking
-
Hi! I’m working with your plugin for a customer, but the plugin was unable to find
wp-load.php
when firing off the TinyMCE modals. This is due to an unusual—but totally supported—structure of WordPress files.To fix it, I had to hardcode the path, but we’ve instituted a better way in a plugin I author.
Take a look at this gist: https://gist.github.com/logoscreative/62658ec041e4b84392c7
It attempts to find the
wp-load.php
file, similar to what your$bootstrapSearchDir
variable is trying to store. In our case, however, if nothing is found, it also looks for a file that a user can put into the directory that tells it where to look: https://github.com/Pardot/pardot-for-wordpress/#the-editor-popup-doesnt-work-and-i-know-that-my-wordpress-installation-is-a-little-differentIt’s pretty easy to implement. Might give it a look and consider adding it.
Thanks!
- The topic ‘Smarter wp-load.php Checking’ is closed to new replies.