Wisertech Solutions How WordPress Works Step by Step | Page 4
theme, WordPress loads the fuctions.php file next. If not it loads the theme that is
active as per functions.php file.
Loading the functions.php file of the primary theme
Once the functions.php file of the child theme is loaded, WordPress next loads
the same file from the parent theme.
Performing "after_setup theme" action
This is the action performed by WordPress after the child, and the primary theme
functions are loaded. This is the action performed related to the theme of the
website.
Setting up the current user object
This is when WordPress sets up the current user object. Using this action, your
website is effectively managed as per the roles or the capabilities of the user.
By the time the above actions are completed, WordPress has always loaded all
the important functions it needs to run your website. Some of the other actions
that are performed are,
- Loading the "init" function that allows the users to add any code after all the
previously
changed information is updated and loaded.
- Performs the action of "widget_init" which lets developers register widgets and
easily run the code.
- Runs the wp() function which is located in the file, wp-includes/function.php.
- WordPress next runs the query and shows the 404 variable errors if there is no
content available for the content. If content is available, the variables are loaded
by performing the action WP_QUERY->get_posts().
- Runs the "template_redirect action next as it helps it determine which page it
needs to load.
Loads the feed template