[wordpress插件] cct_webapicct_webapi

wordpress 插件 文章 2020-03-19 21:20 663 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Many times when a site powered by WordPress wants to supply a Web API for their site, they will work outside of WordPress using either PHP or Ruby on Rails.

很多时候,当由WordPress驱动的网站希望为其网站提供Web API时,它们将使用PHP或Ruby on Rails在WordPress之外运行。

Then they have to write their own functions to get to the information inside the database for their WordPress site.

然后,他们必须编写自己的函数来获取其WordPress网站的数据库内部信息。

I always thought that was a little backwards.

我一直认为那有点倒退。

That is why I wrote the Web API plugin for WordPress.

这就是为什么我为WordPress编写了Web API插件。

With the Web API plugin, you no longer have to do that.

有了Web API插件,您不再需要这样做。

This plugin creates a custom post type called API.

该插件创建一个称为API的自定义帖子类型。

When you create an API post, all of the content will be executed as PHP code just before the theme stuff is executed in WordPress.

当您创建API帖子时,在主题内容在WordPress中执行之前,所有内容都将作为PHP代码执行。

Therefore, you have full access to all the WordPress PHP functions to create whatever you want: JSON output, HTML sniplets, full HTML pages without any of the sites theme or code, or anything else you can imagine.

因此,您可以完全访问所有WordPress PHP函数来创建所需的内容:JSON输出,HTML片段,不带任何网站主题或代码的完整HTML页面,或者您可以想象的任何其他内容。

After the code on the page is executed, then the PHP session will be ended.

页面上的代码执行完后,PHP会话将结束。

安装步骤

    1. Upload cct_webapi.zip to the /wp-content/plugins/ directory and unzip.
    2. cct_webapi.zip 上载到 / wp-content / plugins / 目录并解压缩。

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Create a new API post type with you PHP code and you are running!
    6. 使用您的PHP代码创建一个新的API帖子类型,您正在运行!

下载地址
https://downloads.wordpress.org/plugin/cct-api.1.0.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Admin Pro管理员专业版
[wordpress插件] Aviation Quotes航空行情
[wordpress插件] CC-MinifyCC缩小
[wordpress插件] Badge Grab徽章抢
[wordpress插件] Better WordPress Google XML Sitemaps (support Sitemap Index, Multi-site and Google News)更好的WordPress Google XML Sitemaps(支持Sitemaps索引,多站点和Google新闻)
随便看看
教育科技公司申请微信支付被拒绝? 4799
微信公众号免300认证教程 5892
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5299
小程序广告组件通过审核,但是小程序内没有显示广告? 5067
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9048
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7472
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 6793
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 6128