xmlrpc_call_success_wp_newCategory
Action HookDescription
Fires after a new category has been successfully created via XML-RPC.Hook Information
File Location |
wp-includes/class-wp-xmlrpc-server.php
View on GitHub
|
Hook Type | Action |
Line Number | 3477 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$cat_id
|
ID of the new category. |
array
|
$args
|
An array of new category arguments. |
Usage Examples
Basic Usage
<?php
// Hook into xmlrpc_call_success_wp_newCategory
add_action('xmlrpc_call_success_wp_newCategory', 'my_custom_function', 10, 2);
function my_custom_function($cat_id, $args) {
// Your custom code here
}
Source Code Context
wp-includes/class-wp-xmlrpc-server.php:3477
- How this hook is used in WordPress core
<?php
3472 * @since 3.4.0
3473 *
3474 * @param int $cat_id ID of the new category.
3475 * @param array $args An array of new category arguments.
3476 */
3477 do_action( 'xmlrpc_call_success_wp_newCategory', $cat_id, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
3478
3479 return $cat_id;
3480 }
3481
3482 /**
PHP Documentation
<?php
/**
* Fires after a new category has been successfully created via XML-RPC.
*
* @since 3.4.0
*
* @param int $cat_id ID of the new category.
* @param array $args An array of new category arguments.
*/
Quick Info
- Hook Type: Action
- Parameters: 2
- File: wp-includes/class-wp-xmlrpc-server.php
Related Hooks
Related hooks will be displayed here in future updates.