wphooks.info - xmlrpc_call_success_mw_newMediaObject

xmlrpc_call_success_mw_newMediaObject

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/class-wp-xmlrpc-server.php:
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
		wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $upload['file'] ) );

		/**
		 * Fires after a new attachment has been added via the XML-RPC MovableType API.
		 *
		 * @since 3.4.0
		 *
		 * @param int   $id   ID of the new attachment.
		 * @param array $args An array of arguments to add the attachment.
		 */
		do_action( 'xmlrpc_call_success_mw_newMediaObject', $id, $args );

		$struct = $this->_prepare_media_item( get_post( $id ) );

		// Deprecated values
		$struct['id']   = $struct['attachment_id'];
		$struct['file'] = $struct['title'];
		$struct['url']  = $struct['link'];

		return $struct;