WP Async Task 介绍
WP Async Task 是 TechCrunch 推出的 WordPress 的异步任务插件,该插件用于
TechCrunch.com 网站。
示例代码:
<?php class JPB_Async_Task extends WP_Async_Task { protected $action = 'save_post'; /** * Prepare data for the asynchronous request * * @throws Exception If for any reason the request should not happen * * @param array $data An array of data sent to the hook * * @return array */ protected function prepare_data( $data ) {} /** * Run the async task action */ protected function run_action( $data ) {} }
WP Async Task 官网
https://github.com/techcrunch/wp-async-task/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。