I making a plugin, and I registered several options in the plugin PHP file. So let's consider :
my-plugin/
- my-plugin.php (options are registered here)
- admin.php (the admin page of the plugin)
- parts/
conf.php (here I try to get options I registered and used in my plugin)
I tried to perform a get_option() in the conf.php file, but it doesn't seem to work : it returns empty. The option is registered and set in the DB (I checked).
I guess I can't access to WP registered options from that file ? How can I achieve that ?
EDIT : I can have a log of the error :
<b>Fatal error</b>: Call to undefined function get_option() in <b>conf.php</b> on line <b>6</b>
conf.php? Direct request? Is the filerequired orincluded?var_dump( get_option( 'option_name' ) )tell you?