[wordpress插件] Custom Endpoints With Wp Rest Api具有Wp Rest Api的自定义端点

wordpress 插件 文章 2020-04-10 09:50 441 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

The WordPress REST API is more than just a set of default routes.But you want to add your Custom Endpointsoutes to the WP REST API ?

WordPress REST API不仅仅是一组默认路由,但是您想将自定义端点/路由添加到WP REST API吗?

Fantastic!

太棒了!

Let’s get started with this plugin.

让我们开始使用此插件。

Features

功能

✅ Make a API in one second only
  

✅仅需一秒钟即可创建API
  

✅ API authentication with secret key
  

secret具有密钥的API身份验证
  

✅ Deactivate secret key incase
  

in停用万一密钥
  

✅ Create Endpoint Url In 2 Seconds
  

✅2秒内创建端点网址
  

✅ Capture Api Request/Response Log into system
  

✅捕获Api请求/响应登录到系统
  

✅ Creating Recent Activity
  

✅创建最近的活动
  

✅ Auto Deleteting Log by the system

✅系统自动删除日志

You probably understand we requires lots of hours of work to make a plugins and technical supports, So if you like this plugin, you can buy me an Ice-Cream here – http://wcra.gmnckkp.in/
   

/wcra.gmnckkp.in/“ rel =” nofollow“> http://wcra.gmnckkp.in/
   

OR,
   

或,
   

Directly here – paypal.me/dipoo7

直接在这里– paypal.me/dipoo7

☛ Firstly a Secret Key is needed to call the Custom Endpoints URL, However Admin can create ‘New Secret Key’ on plugin interface in the backend.

☛首先,需要一个密钥来调用自定义端点URL,但是Admin可以在后端的插件界面上创建“ New Secret Key”。

After creating a new access, the plugin will be providing a SECRET KEY, which will be needed on requests.

创建新的访问权限后,该插件将提供一个SECRET KEY,该密钥将在请求时提供。

By default, the plugin will be providing a ROOT SECRET KEY.

默认情况下,该插件将提供一个ROOT SECRET KEY。

You can see those in ‘Endpoint URLs’ tab.

您可以在“端点URL”标签中看到它们。

☛ Now coming to the Custom Endpoints URLs.This plugin provides an easy or simple way to create a Custom Endpointsoute by just one click.

☛现在进入“自定义端点” URL。此插件提供了一种轻松的方法,只需单击一下即可创建自定义端点/路由。

When You are creating an endpoint, this plugin register that ROUTE automatically with parameters(request) defined by the users in ‘Endpoint URLs’ Tab and the plugin builds an endpoint instantly.

当您创建端点时,此插件会使用用户在“端点URL”选项卡中定义的参数(请求)自动注册ROUTE,然后该插件会立即构建一个端点。

If you hit that endpoint URL, you will get a ‘Connection OK’ response instantly.That Means your endpoint uRL/Route is ready.

如果您点击该端点URL,将立即收到“连接成功”响应。这意味着您的端点uRL /路由已准备就绪。

☛ Now one question could appear in your mind that what’s need to create a Custom Endpoints URL, though I need to write my own custom code to make a API .

☛现在您可能会想到一个问题,尽管我需要编写自己的自定义代码来创建API,但是创建自定义端点URL需要做什么呢?

Yes, the answer is you could make a API in very less time with the Endpoint URLs, however you do not need to write/handle the API, you just hang your own code in the filter hook, provided by this plugin, once you have

是的,答案是您可以在很短的时间内使用端点URL来制作API,但是您无需编写/处理API,只需将自己的代码挂在此插件提供的过滤器挂钩中,即可。

created an endpoint, and enjoy the response.

创建了一个端点,并享受响应。

You can find that in Endpoint Listing panel.

您可以在“端点列表”面板中找到它。

After defining the FILTER hook in any function page, you will be started receiving all request parameters and make functioning your API and return your output.

在任何功能页面上定义FILTER挂钩之后,您将开始接收所有请求参数,并使API起作用并返回输出。

☛ This plugin exposes a simple yet easy interface to all settings.

☛此插件为所有设置提供了一个简单而又易于使用的界面。

Users can control settings from the settings panel.

用户可以从设置面板控制设置。

☛ One of the most features of this plugin is that it records all requestsesponses and create a log, if it is TURN ON in the settings panel.Also, the plugin will remove/delete previously captured log VIA CRON, if

☛此插件的最大功能之一是它会记录所有请求/响应并创建日志(如果在“设置”面板中将其打开)。此外,该插件还将通过CRON删除/删除以前捕获的日志,如果

CRON is enabled in the settings panel.

在设置面板中启用了CRON。

The users can select their desired options to delete log in the settings panel.

用户可以在设置面板中选择所需的选项来删除日志。

Please note WordPress CRON is not a real-time auto job, it could be a delay.

请注意,WordPress CRON不是实时自动工作,可能会延迟。

☛ There is a Recent activity tab in the admin panel.

☛管理面板中有一个近期活动标签。

All recent actions will be recorded by this plugin and the activity would be recorded for maximum last 6 days.

此插件将记录所有最近的操作,并且该活动将记录最近6天的时间。

Admin can change the number of days from the settings panel.

管理员可以在设置面板中更改天数。

"}];jQuery(function(){$("#article_content").find("a").each(function(){var url =$(this).attr("href");for(var i=0;i"+c+"

");} } }) })