钩子文档

xmlrpc_call_success_mw_newMediaObject

💡 云策文档标注

概述

xmlrpc_call_success_mw_newMediaObject 是一个 WordPress Hook,在通过 XML-RPC MovableType API 成功添加新附件后触发。

关键要点

  • 触发时机:当使用 XML-RPC MovableType API 的 mw_newMediaObject 方法成功上传并添加新附件后。
  • 参数:$attachment_id(新附件的 ID,整数类型)和 $args(添加附件时使用的参数数组)。
  • 相关函数:由 wp_xmlrpc_server::mw_newMediaObject() 调用,用于文件上传。
  • 版本历史:自 WordPress 3.4.0 版本引入。

📄 原文内容

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

Parameters

$attachment_idint
ID of the new attachment.
$argsarray
An array of arguments to add the attachment.

Source

do_action( 'xmlrpc_call_success_mw_newMediaObject', $attachment_id, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase

Changelog

Version Description
3.4.0 Introduced.