xmlrpc_call_success_mw_newPost
Action HookDescription
Fires after a new post has been successfully created via the XML-RPC MovableType API.Hook Information
File Location |
wp-includes/class-wp-xmlrpc-server.php
View on GitHub
|
Hook Type | Action |
Line Number | 5694 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$post_id
|
ID of the new post. |
array
|
$args
|
An array of arguments to create the new post. |
Usage Examples
Basic Usage
<?php
// Hook into xmlrpc_call_success_mw_newPost
add_action('xmlrpc_call_success_mw_newPost', 'my_custom_function', 10, 2);
function my_custom_function($post_id, $args) {
// Your custom code here
}
Source Code Context
wp-includes/class-wp-xmlrpc-server.php:5694
- How this hook is used in WordPress core
<?php
5689 * @since 3.4.0
5690 *
5691 * @param int $post_id ID of the new post.
5692 * @param array $args An array of arguments to create the new post.
5693 */
5694 do_action( 'xmlrpc_call_success_mw_newPost', $post_id, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
5695
5696 return (string) $post_id;
5697 }
5698
5699 /**
PHP Documentation
<?php
/**
* Fires after a new post has been successfully created via the XML-RPC MovableType API.
*
* @since 3.4.0
*
* @param int $post_id ID of the new post.
* @param array $args An array of arguments to create the new post.
*/
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.