[WordPress] 外掛分享: Distributor – Remote Quickedit

首頁外掛目錄 › Distributor – Remote Quickedit
WordPress 外掛 Distributor – Remote Quickedit 的封面圖片
10+
安裝啟用
尚無評分
867 天前
最後更新
問題解決
WordPress 5.1.0+ PHP 7.0+ v0.2.2 上架:2023-02-14

內容簡介

這個外掛針對多站網路中接收站,重新啟用 Distributor 外掛對遠端文章的快速編輯功能,讓您可以從遠端站點直接修改原始文章。這個外掛是基於 10up 公司出品的優秀 Distributor 外掛而開發的。

這個外掛的維護及部署在 github 上的 carstingaxion/distributor-remote-quickedit。

功能

在接收站使用 WordPress 原生的快速編輯功能,對分佈式文章進行小改動。預設 Distributor 外掛不提供此功能。

相容性

這個外掛是一個附加功能,需要以下條件:

Distributor (官網|GitHub)

使用方式

此外掛預設不啟用任何功能。

能夠修改遠端來源的文章,是一項有風險的事情。您必須透過程式啟用此外掛,以避免任何意外不良後果。

若您要為某個文章類型重新啟用快速編輯功能,您需要為該 post_type 呼叫 add_post_type_support() 函式,並將支援的功能設為 distributor-remote-quickedit。請確保在此外掛載入之前,針對每個目標文章類型設定好此功能支援。

以 post_type 為 book 為例:

add_action( 'admin_init', function () {
add_post_type_support( 'book', 'distributor-remote-quickedit' );
}, 9 );

一定要在外掛在 admin_init 執行之前,定義您的 post_type_supports,預設權重為 10。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Re-enable quickedit for distributed posts on the receiving site within a multisite network. This allows you to make changes to the original post from the remote site. This is a small add-on for the glorious Distributor plugin by 10up.
This Add-on is maintained at and deployed from carstingaxion/distributor-remote-quickedit on github.
Features

Use native WordPress quickedit on the receiving side of a distributed post to make minor changes, which is disabled by the Distributor-plugin by default.

Compatibility
This plugin is an add-on for & requires:

Distributor (Website|GitHub) (only tested up to version 1.9.1, maybe not yet ready for the new 2.0.x)

Usage
This plugin does nothing by default.
Being able to modify posts, that were syndicated from a remote source, is a risky thing. To prevent any unwanted side-effects you have to pro-actively enable this plugin by code.
In order to re-enable the quick-edit functionality for a particular post_type you need to call add_post_type_support() for a support-feature called distributor-remote-quickedit. Do this for every desired post_type before this plugin loads.
With a post_type of book, you could do it like so:
add_action( 'admin_init', function () {
add_post_type_support( 'book', 'distributor-remote-quickedit' );
}, 9 );

It’s important to declare your post_type_supports before the plugin is executed on admin_init with a default priority of 10!

延伸相關外掛

文章
Filter
Mastodon