- February 24, 2015 at 3:16 pm #4009
Hi, I have a WordPress Bedrock installation http://roots.io/wordpress-stack/
Bedrock modifies the default WordPress directories. Unfortunately this means I’m having a problem with Ajax Search Pro.
The asp.shortcode.probox.php has a number of lines (11, 28, 56) which use file_get_contents() instead of plugins_url(), which breaks the plugin.
e.g. echo file_get_contents(ABSPATH . ‘wp-content/plugins/’ . $style[‘magnifierimage’]);
I get an output like this:
Instead of this:
Is there any way this can be fixed? I can edit the code myself for now, but I don’t want to have to support my client’s sites every time they update the Ajax Search Pro plugin and overwrite my changes.
JamesFebruary 24, 2015 at 5:05 pm #4012
I’m currently working on the upcoming version and if I remember correctly I fixed this as someone reported something similar with the paths.
I think there are only 3 instances of ABSPATH there in the current version. The fixed lines look like this now:
echo file_get_contents(WP_PLUGIN_DIR . '/' . $style['magnifierimage']);
Would you mind checking if this solution is working in your case? A core developer suggested using the WP_PLUGIN_DIR constant as it should hold the correct plugin directory at all times.
I will mark this path issue solved if you can confirm that this solution works, and we don’t need to worry about this in the future versions anymore 😉Best,
If you like my products, don't forget to rate them on codecanyon :)
February 24, 2015 at 5:15 pm #4014
Hey Ernest, thanks for the quick reply. I’ve tested your code and it works fine. Thanks for the help!
You must be logged in to reply to this topic.