xmlrpc_call_success_mw_newMediaObject
Fires after a new attachment has been added via the XML-RPC MovableType API.
Usage
add_action( 'xmlrpc_call_success_mw_newMediaObject', 'wp_kama_xmlrpc_call_success_mw_newMediaObject_action', 10, 2 );
/**
* Function for `xmlrpc_call_success_mw_newMediaObject` action-hook.
*
* @param int $attachment_id ID of the new attachment.
* @param array $args An array of arguments to add the attachment.
*
* @return void
*/
function wp_kama_xmlrpc_call_success_mw_newMediaObject_action( $attachment_id, $args ){
// action...
}
- $attachment_id(int)
- ID of the new attachment.
- $args(array)
- An array of arguments to add the attachment.
Changelog
| Since 3.4.0 | Introduced. |
Where the hook is called
wp-includes/class-wp-xmlrpc-server.php 6533
do_action( 'xmlrpc_call_success_mw_newMediaObject', $attachment_id, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase