[WordPress] 外掛分享: WordPress on Routes

首頁外掛目錄 › WordPress on Routes
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
10+
安裝啟用
尚無評分
4061 天前
最後更新
問題解決
WordPress 3.8+ v0.3.0 上架:2014-05-01

內容簡介

WordPress on Routes 是一款 WordPress 外掛,主要受 Ruby 微框架啟發。它為您的 WordPress 實例添加了添加自定義路由的功能,對於表單提交、類似 API 的功能等非常有用。

此外掛可以讓您:

向您的 WordPress 安裝添加自定義路由
設置 GET / POST / DELETE 等方法
設置主體(作為文本或模板)或動作(使用 add / do_action)。如果兩者都定義了,則 action 優先於 body 。
設置標頭(例如 ‘Content-Type’ => ‘text/html; charset=UTF-8’)
不包括標頭(例如 ‘Set-Cookie’)
設置參數,例如‘/my/route/:param1/:param2’
使用正則表達式添加代理或按代理過濾
代理過濾器的負邏輯(例如/ ^(!火狐) 。$ /,它告訴“除 Firefox 之外的每個瀏覽器”)
包括標題和底部

有關基本和高級使用示例,請查看https://github.com/markzero/wp-on-routes。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.3.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WordPress on Routes」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

WordPress on Routes is a plugin for WordPress, inspired mainly by Ruby micro-frameworks. It adds ability to add custom routes to your WordPress instance. Useful for form submissions, API-like features, etc.
This plugin allows you to:

Add custom routes to your WordPress installation
Set method GET/POST/DELETE etc.
Set body (as text, or template) or action (using add/do_action). If both are defined, action takes precedence over body.
Set header (e.g. ‘Content-Type’ => ‘text/html; charset=UTF-8’)
Exclude header (e.g. ‘Set-Cookie’)
Set parameter like ‘/my/route/:param1/:param2’
Add agents or filter by agents, using regular expressions
Agent filter for negative logic (e.g. /^((?!Firefox).)$/, which tells “every browser except Firefox”)
Include header and footer

For basic and advanced usage examples, take a look at https://github.com/markzero/wp-on-routes.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon