Wisertech Solutions How WordPress Works Step by Step | Page 3
files are defined by any other plug-in, otherwise the functions of pluggable.php
are defined.
Run the action – plugins_loaded
Next, WordPress runs the action "plugins_loaded" which allows the users or the
developers to perform the functions associated with the active plugins.
Loading the rewrite rules
After the above functions, WordPress next loads the rewrite rules. This action
helps it to use SEO friendly URLs.
$wp_query, $wp_rewrite, $wp
Once the rewrite rules are loaded, the below-mentioned objects are run by
WordPress.
$wp_query – This is a query that tells the WordPress query format the content is
needed in
$wp_rewrite – This is the instance that has the WP_Rewrite class. This query has
all the rules and functions related to rewrite, and this helps WordPress display the
right URL based on the content requested.
$wp – This is the instance that has all the functions needed to complete the
primary query.
Action – "Setup_theme"
WordPress next moves on to perform the action – "Setup_theme." This is the
action performed before your main WordPress gets loaded.
Loading the functions.php of the child theme
Every theme in WordPress comes along with a child theme that makes it easy to
edit. The functions.php is a file that acts more like a plug-in and can be used to
add the needed features to the website. If the template you used includes a child