mike235
Member
Posted 2 years ago #
Hi,
I have a php script that I call when a form is submitted (from a plugin I'm developing), obviously this script does not have access to the wordpress functions.
How can I access the wordpress functions? Specifically, I want to access the get_option function
Any idea would be great
mike235
Member
Posted 2 years ago #
I just found what I needed here :
http://wpengineer.com/embed-wordpress-functions-outside-wordpress/
It's very easy in fact, just add : require( '../../../wp-load.php' );
at the top of your script (with relative path pointing to WP root on your server of course)