Closed yivi closed 10 years ago
The most likely issue is that you're running the $y->admin->add_meta_box();
function in the main plugin file here. That needs to be called on the add_meta_boxes
hook otherwise it won't work correctly. If you call it in the main plugin file it will give the error that you're seeing there.
Once more, it was a classic case of "holding it wrong". Got it now, and also have a better understanding of how the templates+apis are meant to be used.
Many thanks for all your help. I hope I can contribute back a bit later on.
No worries - happy to help :)
At some point I'm going to create an example plugin that shows you how to use this template in a practical way, but I haven't had time to do that just yet.
I'm sure it's me doing something wrong... but I'm a bit confused by this:
In my main plugin file I do:
But then I get an error about "add_meta_box" not being defined. The call gets to the Admin API and the admin API calls wordpress' version of add_meta_box... but seemingly can't find it in scope.
Which is weird, I can see in the call list that WP is completely loaded by that point:
Shouldn't this work as it is? Again, I feel it's very likely to be user error... but can't understand why it thinks add_meta_box is undefined at that point. :(
Thanks and regards