內容簡介
使用 WP REST API 管理網站的端點
所有額外的端點都在 wp-site-monitor/v1/ 命名空間下。
例如:https://example.com/wp-json/wp-site-monitor/v1/wp-version
額外的端點
wp-version 以字串形式返回 WordPress 的目前版本。
範例輸出:"4.9.2"
plugins 以 JSON 物件列出已安裝的外掛並提供外掛詳細資訊。
範例輸出:
json
{
"wp-super-cache/wp-cache.php": {
"Name": "WP Super Cache",
"PluginURI": "https://wordpress.org/plugins/wp-super-cache/",
"Version": "1.5.9",
"Description": "非常快速的 WordPress 快取外掛。",
"Author": "Automattic",
"AuthorURI": "https://automattic.com/",
"TextDomain": "wp-super-cache",
"DomainPath": "",
"Network": false,
"Title": "WP Super Cache",
"AuthorName": "Automattic",
"Active": true
},
"wordpress-seo/wp-seo.php": {
"Name": "Yoast SEO",
"PluginURI": "https://yoa.st/1uj",
"Version": "6.1.1",
"Description": "首個真正的 WordPress 全方位 SEO 解決方案,包括內容分析、XML 網站地圖等。",
"Author": "Team Yoast",
"AuthorURI": "https://yoa.st/1uk",
"TextDomain": "wordpress-seo",
"DomainPath": "/languages/",
"Network": false,
"Title": "Yoast SEO",
"AuthorName": "Team Yoast",
"Active": true
}
}
WP Site Monitor 設定選單提供選項以切換各個端點。
外掛標籤
開發者團隊
原文外掛簡介
WP REST API endpoints to help manage sites remotely
All additional endpoints are under the wp-site-monitor/v1/ namespace.
e.g. https://example.com/wp-json/wp-site-monitor/v1/wp-version
Additional endpoints
wp-version returns the current version of wordpress as a string.
Example output: "4.9.2"
plugins returns a JSON object listing installed plugins with the plugin details.
Example output:
json
{
"wp-super-cache/wp-cache.php": {
"Name": "WP Super Cache",
"PluginURI": "https://wordpress.org/plugins/wp-super-cache/",
"Version": "1.5.9",
"Description": "Very fast caching plugin for WordPress.",
"Author": "Automattic",
"AuthorURI": "https://automattic.com/",
"TextDomain": "wp-super-cache",
"DomainPath": "",
"Network": false,
"Title": "WP Super Cache",
"AuthorName": "Automattic",
"Active": true
},
"wordpress-seo/wp-seo.php": {
"Name": "Yoast SEO",
"PluginURI": "https://yoa.st/1uj",
"Version": "6.1.1",
"Description": "The first true all-in-one SEO solution for WordPress, including on-page content analysis, XML sitemaps and much more.",
"Author": "Team Yoast",
"AuthorURI": "https://yoa.st/1uk",
"TextDomain": "wordpress-seo",
"DomainPath": "/languages/",
"Network": false,
"Title": "Yoast SEO",
"AuthorName": "Team Yoast",
"Active": true
}
}
Options are provided in the WP Site Monitor settings menu to toggle individual endpoints.
