[WordPress] 外掛分享: REST API Extender

首頁外掛目錄 › REST API Extender
WordPress 外掛 REST API Extender 的封面圖片
20+
安裝啟用
尚無評分
701 天前
最後更新
問題解決
WordPress 5.0+ v2.2 上架:2024-04-14

內容簡介

**總結:**
REST API Extender 是一個 WordPress 外掛,用於擴展 WordPress REST API 的功能。此外掛提供兩個主要功能:調整永久連結選項和主題安裝及啟用。

**問題與答案:**
1. REST API Extender 是用於擴展哪個 WordPress 功能?
- 答:REST API 的功能。

2. 請說明 REST API Extender 的兩個主要功能。
- 答:調整永久連結選項和主題安裝及啟用。

3. 如果要透過 REST API 更新 WordPress 站點的永久連結設定,應該使用什麼方法?
- 答:透過發送 POST 請求至特定端點。

4. 調整永久連結設定時,請列出應包含在請求主體中的參數。
- 答:permalink_structure(永久連結結構)、category_base(分類基礎)和 tag_base(標籤基礎)。

5. 使用 REST API Extender 安裝和啟用主題時,應該提供什麼資訊?
- 答:主題的 URL、樣式表和標識。

6. 什麼角色權限需要使用者才能管理調整永久連結選項和主題安裝/啟用功能?
- 答:manage_options(管理員角色)。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「REST API Extender」→ 直接安裝(推薦)

原文外掛簡介

The REST API Extender is a WordPress plugin that extends the functionality of the WordPress REST API.
It provides two main features:

Permalink Options Management
This plugin allows you to update the permalink settings of your WordPress site via the REST API. You can change the permalink structure, category base, and tag base using a simple POST request.

To update the permalink settings, send a POST request to the following endpoint:
/wp-json/raext/permalink-options/v1/settings
The request body should include the following parameters:

permalink_structure (string): The new permalink structure.
category_base (string, optional): The new category base.
tag_base (string, optional): The new tag base.

Example request:
POST /wp-json/raext/permalink-options/v1/settings
Content-Type: application/json
{
“permalink_structure”: “/%year%/%postname%/”,
“category_base”: “categories”,
“tag_base”: “tags”
}

Theme Installation and Activation
The plugin also enables you to install and activate themes from a remote URL using the REST API. You have to provide the theme URL, stylesheet, and slug, and the plugin will handle the installation and activation process.

To install and activate a theme from a remote URL, send a POST request to the following endpoint:
/wp-json/raext/theme-manager/v1/install
The request body should include the following parameters:

theme_url (string): The URL of the theme ZIP file.
theme_stylesheet (string): The stylesheet of the theme (e.g., twentytwenty).
theme_slug (string): The slug of the theme (e.g., twentytwenty).

Example request:
POST /wp-json/raext/theme-manager/v1/install
Content-Type: application/json
{
“theme_url”: “https://example.com/themes/twentytwenty.zip”,
“theme_stylesheet”: “twentytwenty”,
“theme_slug”: “twentytwenty”
}
Developed by the creators of SEO Neo
Permissions
Both the permalink options management and theme installation/activation features require the user to have the manage_options capability (an administrator role).

延伸相關外掛

文章
Filter
Apply Filters
Mastodon