Plugin Author
Josh
(@josh401)
So how do you get the constants.. if you are trying to access them outside of a WP file.
For instance… ultimate-tinymce/addons/shortcodes/shortcodes.php
This file requires the loading of wp-load.php in order to load the globally defined ‘shortcode_tags’ needed for the addon.
What is the best method to access this file… because you can’t use any of the WP constants until this file is loaded.
I don’t know, I’m just a user. My wp-content is defined in my
public_html/wp-config.php
‘WP_CONTENT_DIR’
I would suggest if you can’t read that, then define your own variable that is used across your plugin, and stick it in you main.php and users can change it there in one place. Because now you’ve told me I need to search for other place to change that setting.
Thanks.
Plugin Author
Josh
(@josh401)
Gotcha. I’m working on it now.
Apparently, the correct way to do this is via an ajax call to WP and using the variable in a script.
It’ll take a little trial and error… but I’ll get this updated for my next release.
Thank you for your help.
Plugin Author
Josh
(@josh401)
My pleasure. Thanks for taking the time to “get me moving” on this!
May we mark the thread as resolved?