Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress Customizing the WordPress Admin Area Admin Color Schemes Customizing Admin Color Schemes from Scratch

Stavros Sofroniadis
Stavros Sofroniadis
Courses Plus Student 1,503 Points

About function.php

In video tutorial https://teamtreehouse.com/library/customizing-the-wordpress-admin-area/admin-color-schemes/customizing-admin-color-schemes-from-scratch

Zac mentions that we call function wpt_admin_color_schemes by using admin_init hook,

If you could assist, what is admin_init hook and what its role?

In a video tutorial at from 6min after was mentioned " So what this says is, is that as soon as the admin area is initialized, as soon as someone is logged in, calling it pages in the admin area. Make sure that you run the C, that, or make sure that we run this function to make this color scheme available"

dont understand what he is saying,

Also mentioned that can be aplied for certain user a certain administration color style.

If possible can mention the code,

Thank You,

1 Answer

Matt Campbell
Matt Campbell
9,767 Points

Hey Stavros,

Have you done the course that explains WordPress' hook architecture? Once you understand actions & filters, it will make sense.

The admin_init action is basically the hook that runs when the WP Admin area is initialised, when things start being prepared to render the admin area. It's one of the earliest hooks in the sequence.