Whenever you plan to begin developing applications on WordPress using AJAX technology, you have to solve a number of
每当您打算开始使用AJAX技术在WordPress上开发应用程序时,都必须解决许多问题。
minor issues unrelated to the logic of your application:
与您的应用程序逻辑无关的小问题: p>
ul>
Usually these issues generates a lot of spaghetti code, moreover, each new request type requires some customization of
通常,这些问题会生成大量的意大利面条代码,此外,每个新的请求类型都需要对
进行一些自定义
code.
码。
Managing all of this, you forget about the function that you would like to implement.
管理所有这些,您会忘记要实现的功能。 p>
AJAX Manufactory plugin for WordPress have most of these tasks already solved.
用于WordPress的AJAX Manufactory插件已经解决了大多数这些任务。
You can think about functionality and
您可以考虑功能和
business logic instead.
而是业务逻辑。 p>
What you can have from the box:
您可以从包装盒中获得什么: p>
- A simple function at the client side which allows to send any your complex data from javascript to WordPress server
- 客户端的简单功能,可以将您所有的复杂数据从javascript发送到WordPress服务器
side.
侧面。 li>
- An AJAX response wrapper at the server side which gives to you sent data as PHP array and allows you to create
- 服务器端的AJAX响应包装器,可以将您发送的数据作为PHP数组发送给您,并允许您创建
an AJAX response as a set of simple “commands” like “make an alert”, “set up javascript variable”, “put html text to
AJAX响应作为一组简单的“命令”,例如“发出警报”,“设置javascript变量”,“将html文本放入
specific html node(s)”, “execute a javascript function”, “go to specific URL” etc.
特定的html节点”,“执行javascript函数”,“转到特定的URL”等。 li>
- Automatic execution of “commands” queue at the client side.
- 在客户端自动执行“命令”队列。
Additionally you can specify your own callback.
此外,您可以指定自己的回调。 li>
ul>
Documentation
文档 h4>
Please refer Documentation.
请参考文档。 p>