populate_options
Action HookDescription
Fires before creating WordPress options and populating their default values.Hook Information
File Location |
wp-admin/includes/schema.php
View on GitHub
|
Hook Type | Action |
Line Number | 370 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into populate_options
add_action('populate_options', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-admin/includes/schema.php:370
- How this hook is used in WordPress core
<?php
365 /**
366 * Fires before creating WordPress options and populating their default values.
367 *
368 * @since 2.6.0
369 */
370 do_action( 'populate_options' );
371
372 // If WP_DEFAULT_THEME doesn't exist, fall back to the latest core default theme.
373 $stylesheet = WP_DEFAULT_THEME;
374 $template = WP_DEFAULT_THEME;
375 $theme = wp_get_theme( WP_DEFAULT_THEME );
PHP Documentation
<?php
/**
* Fires before creating WordPress options and populating their default values.
*
* @since 2.6.0
*/
Quick Info
- Hook Type: Action
- Parameters: 0
- File: wp-admin/includes/schema.php
Related Hooks
Related hooks will be displayed here in future updates.