WordPress: PHP Fatal error: Call to undefined function get_option()
I’ve searched almost everywhere, but proposed answers didn’t help me.
Problem: I’ve got a WordPress installation, last version (3.6.1). I’ve done a clean install multiple times, looked into the
I’m developing a plugin, and I’m making use of the WordPress-defined function
Make it even more weird: other functions defined in those included files, like
So, for example, this works:
But this doesn’t:
Anyone has a clue?
As asked, the full block of code from where I call
Also maybe worth to mention: I’ve got a class that wraps the actual plugin, and in the bottom of that .php file, I’ve got (outside the class definition), this code:
These all work like a charm.
I suspect wp-includesoption.php is not being loaded.
Just for grins, right before the call to get_options() add
Or try calling something else in option.php like:
You can see all the files that are currently included/required by inserting this into your code: