Bummer! This is just a preview. You need to be signed in with a Treehouse account to view the entire video.
Hooking a Setting into the admin_init Action1:12 with Zac Gordon
In this video we finally hook the code that we have written in with the admin_init action hook.
An action that we're going to be using with this is called admin_init.
And then we will pass it our wpt_theme_init.
So when the admin area is initializing we will have all these settings built out,
and then when our, theme page comes up, these will eventually show on the page.
Now, at this point, we haven't really gone over the code, to show how we
get this to display on the actually theme's option's page.
There's a couple more things that we have to do for this, and
we'll see that if we come in, for example, now, let's see, what do we got here?
On line 23.
Just forgot that.
We can see that we have our theme options page, but
we don't have any of this displaying yet.
And this all has to do with our basic wpt_theme_options_page and
what it's echoing out.
You need to sign up for Treehouse in order to download course files.Sign up