added_option
Action HookDescription
Fires after an option has been added.Hook Information
File Location |
wp-includes/option.php
View on GitHub
|
Hook Type | Action |
Line Number | 1187 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$option
|
Name of the added option. |
mixed
|
$value
|
Value of the option. |
Usage Examples
Basic Usage
<?php
// Hook into added_option
add_action('added_option', 'my_custom_function', 10, 2);
function my_custom_function($option, $value) {
// Your custom code here
}
Source Code Context
wp-includes/option.php:1187
- How this hook is used in WordPress core
<?php
1182 * @since 2.9.0
1183 *
1184 * @param string $option Name of the added option.
1185 * @param mixed $value Value of the option.
1186 */
1187 do_action( 'added_option', $option, $value );
1188
1189 return true;
1190 }
1191
1192 /**
PHP Documentation
<?php
/**
* Fires after an option has been added.
*
* @since 2.9.0
*
* @param string $option Name of the added option.
* @param mixed $value Value of the option.
*/
Quick Info
- Hook Type: Action
- Parameters: 2
- File: wp-includes/option.php
Related Hooks
Related hooks will be displayed here in future updates.