xmlrpc_call_success_mw_newMediaObject хук-событиеWP 3.4.0

Fires after a new attachment has been added via the XML-RPC MovableType API.

Использование

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   $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( $id, $args ){

	// action...
}
$id(int)
ID of the new attachment.
$args(массив)
An array of arguments to add the attachment.

Список изменений

С версии 3.4.0 Введена.

Где вызывается хук

wp_xmlrpc_server::mw_newMediaObject()
xmlrpc_call_success_mw_newMediaObject
wp-includes/class-wp-xmlrpc-server.php 6450
do_action( 'xmlrpc_call_success_mw_newMediaObject', $id, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase

Где используется хук в WordPress

Использование не найдено.