setup_theme
Action HookDescription
Fires before the theme is loaded.Hook Information
File Location |
wp-settings.php
View on GitHub
|
Hook Type | Action |
Line Number | 653 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into setup_theme
add_action('setup_theme', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-settings.php:653
- How this hook is used in WordPress core
<?php
648 /**
649 * Fires before the theme is loaded.
650 *
651 * @since 2.6.0
652 */
653 do_action( 'setup_theme' );
654
655 // Define the template related constants and globals.
656 wp_templating_constants();
657 wp_set_template_globals();
658
PHP Documentation
<?php
/**
* Fires before the theme is loaded.
*
* @since 2.6.0
*/
Quick Info
- Hook Type: Action
- Parameters: 0
- File: wp-settings.php
Related Hooks
Related hooks will be displayed here in future updates.