[WordPress] 外掛分享: Simple Revisions Delete

首頁外掛目錄 › Simple Revisions Delete
WordPress 外掛 Simple Revisions Delete 的封面圖片
10,000+
安裝啟用
★★★★
4.9/5 分(48 則評價)
108 天前
最後更新
問題解決
WordPress 3.5+ PHP 5.5.12+ v1.5.5 上架:2015-01-04

內容簡介

這個外掛允許您逐個或一次性刪除文章的修訂版(清除或批量動作)。與 Gutenberg(實驗性的)和經典編輯器兼容。

它有什麼作用?

Simple Revisions Delete 在文章提交框內添加一個不顯眼的鏈接,以便讓您通過 AJAX清除(刪除)它的修訂版本,也可進行批量動作。

它可幫助您刪除不必要的文章修訂版本,讓您的資料庫保持清潔。與其他類似的外掛不同,它可以讓您單獨刪除特定文章的修訂,而不是一次刪除整個站點的修訂版本。
該外掛完全整合在 WordPress 後台中,使用本地的核心功能進行安全刪除版本。
該外掛非常輕巧,非常簡單易用,只需完成工作!

它是如何工作的?

外掛會在文章提交框內,與預設修訂次數計數器旁邊添加一個不顯眼的鏈接(請參閱截圖部分)。
當您單擊它時,它將通過 AJAX(無 JS 也是支援的)清除相應的文章修訂版本。
它還會在文章/頁面行視圖中添加新的批量操作選項,以讓您一次清除多個文章的修訂版本。

最新狀態是什麼?

自 v2 版本以來,您現在可以從 Gutenberg 編輯器內部一次性清除所有文章版本。
請記住,此功能是實驗性的。我尚未發現任何方法可以使用當前可用的區塊編輯器方法適當地運作它。我使用了jQuery(和AJAX),這幾乎是一種駭客攻擊(解決方法),而不是採用區塊編輯器需要的語言的一項乾淨的方法。

自v1.3版以來,您可以逐個刪除修訂版本(請參閱截圖)。

查看外掛頁面

注意:此外掛沒有管理頁面-不需要。

文章類型支援

預設支援的文章類型為文章和頁面,但您可以輕鬆添加自定義文章類型或移除預設的文章類型,使用以下掛鉤:

function bweb_wpsrd_add_post_types( $postTypes ){
$postTypes[] = 'additional-cpt';
$postTypes[] = 'another-cpt';
return $postTypes;
}
add_filter( 'wpsrd_post_types_list', 'bweb_wpsrd_add_post_types' );

參見 CODEX 以支援所有 CPT:https://codex.wordpress.org/Function_Reference/get_post_types

自訂用戶權限

預設的權限是 delete_post以清除或刪除修訂版本,但您可以使用以下掛鉤覆寫它:

function bweb_wpsrd_capability() {
return 'edit_post';
}
add_filter('wpsrd_capability', 'bweb_wpsrd_capability');

多國語言

此外掛只有幾個句子,但您可以通過 .MO 和 .PO 文件輕鬆地翻譯它們。目前可用的語言為:

英語
法語
德語-感謝mallard66
荷蘭語-感謝jondor

成為翻譯人員並向我發送您的翻譯!聯絡我

查看我的其他外掛

如果出現任何問題,請要求幫助或報告錯誤。這是使社區受益的最佳方法!

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.5.5) 或搜尋安裝

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

原文外掛簡介

Let you delete your posts revisions individually or all at once (purge or bulk action). Compatible with Gutenberg (experimental) and classic editor.
What does it do?
Simple Revisions Delete adds a discreet link within a post submit box to let you purge (delete) its revisions via AJAX. Bulk actions also available.
It helps you keep a clean database by removing unnecessary posts revisions. Unlike other similar plugins, it lets you delete only specific posts revisions, not all your site revisions at once.
The plugin is perfectly integrated in the WordPress back-end, and uses native core functions to safely delete revisions.
It is very lightweight, very simple to use, and just does the job!
How does it work?
The plugin adds a discreet link in the post submit box, next to the default revisions counter (see screenshots section).
When you click on it, it will purge the appropriate post revisions via AJAX (no JS is also support).
It also add a new bulk action option in the post/page row view to let you purge revisions of multiple posts at once.
What’s new?
Since v2 you can now purge all your posts revisions from within the Gutenberg editor.
Keep in mind that this feature is experimental. I haven’t yet find any way to make it works in a proper way with the current block editor available methods. I’m using jQuery (and AJAX) which is pretty much a hack (a workaround) and not a clean method considering the langages using by the Block Editor.
Since v1.3 you can delete a single revision at once (see screenshots).
See plugin page
NOTE: There is no admin page for this plugin – none is needed.
Post Types support
The default supported post types are post and page, but you can easily add custom post types or remove default post types with the following hook:
function bweb_wpsrd_add_post_types( $postTypes ){
$postTypes[] = 'additional-cpt';
$postTypes[] = 'another-cpt';
return $postTypes;
}
add_filter( 'wpsrd_post_types_list', 'bweb_wpsrd_add_post_types' );

See CODEX to add support to all CPTs: https://codex.wordpress.org/Function_Reference/get_post_types
Custom user capability
The default capability to purge or remove rivisions is delete_post, but you can override this with the following hook:
function bweb_wpsrd_capability() {
return 'edit_post';
}
add_filter('wpsrd_capability', 'bweb_wpsrd_capability');

Languages
The plugin only bears a few sentences, but you can easily translate them through .MO & .PO files. Currently available languages are:

English
French
Deutsch – Thanks to mallard66
Dutch – Thanks to jondor

Become a translator and send me your translation! Contact-me
CHECK OUT MY OTHER PLUGINS
Please ask for help or report bugs if anything goes wrong. It is the best way to make the community benefit!

延伸相關外掛

文章
Filter
Apply Filters
Mastodon