rest_preload_api_request()
rest_preload_api_request( array $memo, string $path )
将内部请求的结果附加到REST API,以便预加载要附加到页面的数据。
Append result of internal request to REST API for purpose of preloading data to be attached to a page.
说明(Description)
应在array_reduce的上下文中调用。
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$memo | (array) | 必需 | 减少蓄能器。 |
$path | (string) | 必需 | 要预加载的REST API路径。 |
返回(Return)
(array)修改的reduce累加器。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
5.0.0 | wp-includes/rest-api.php:1520 | 0 | 4 |
rest_preload_api_request() 为WP2原创文章,链接:https://www.wp2.cn/functions/rest_preload_api_request/