前言介紹
- 這款 WordPress 外掛「WP-Post-Meta-Revisions」是 2014-12-03 上架。
- 目前有 400 個安裝啟用數。
- 上一次更新是 2023-07-17,距離現在已有 657 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.1 以上版本才可以安裝。
- 有 5 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
內容簡介
這個外掛程式實現了 "https://core.trac.wordpress.org/ticket/20564" 中提出的文章元數據修訂功能。
將此代碼作為外掛程式發布的目的是讓盡可能多的人輕鬆測試文章元數據修訂功能,並希望按照插件化功能的模式將此功能納入核心。
此外掛程式的進一步開發將繼續在其GitHub 存儲庫上進行。歡迎提交拉取請求!
為了使用這個外掛程式,您必須運行 WordPress 4.1 或更新版本,因為 4.1 中添加了兩個掛鉤,這些掛鉤對於此功能的實現是必需的。
要對文章元數據進行修訂,您可以通過一個過濾器添加其鍵:
function add_meta_keys_to_revision( $keys ) {
$keys[] = '要進行修訂的元數據鍵';
return $keys;
}
add_filter( 'wp_post_revision_meta_keys', 'add_meta_keys_to_revision' );
特點:
允許一個白名單陣列進行“修訂”的元數據鍵(可以隨時更改)
如果元數據的值已更改,將在保存時保存元數據的修訂
自動保存期間還會觸發元數據修訂的保存(如果已更改)
還原修訂會恢復該修訂中的修訂元字段值(包括自動保存)
支持為單個鍵存儲多個值(並恢復它們)
通過 get_post_metadata 添加修訂元數據到預覽數據中
包括演示功能的單元測試
集成了 Travis CI 和 GitHub 存儲庫的測試(感謝 @mattheu)
原文外掛簡介
This plugin implements a post meta revisioning feature as arrived at in https://core.trac.wordpress.org/ticket/20564.
The goal of releasing this code as a plugin is to allow as many people as possible to easily test the post meta revisioning feature, and also hopefully move towards inclusion of the feature into core, following the Features as Plugins model.
Further development of the code for this plugin will continue on its GitHub repository. Pull requests welcome!
To use this plugin, you must be running WordPress 4.1 or newer, two hooks were added in 4.1 that are required for this implementation.
To revision a post meta, you add its key via a filter:
function add_meta_keys_to_revision( $keys ) {
$keys[] = 'meta-key-to-revision';
return $keys;
}
add_filter( 'wp_post_revision_meta_keys', 'add_meta_keys_to_revision' );
Features:
Allows for a whitelisted array of ‘revisioned’ meta keys (which can change at any time)
A revision for the meta is stored on save (if the meta value has changed)
A meta revision save (if changed) is also triggered during auto-saves
Restoring a revision restores the revisioned meta field’s values at that revision (including auto-saves)
Supports storing of multiple values for a single key (and restoring them)
Adds revisioned meta to the preview data via get_post_metadata
Includes unit tests demonstrating feature
Travis CI tests integrated with GitHub repository, props @mattheu
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP-Post-Meta-Revisions」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.5 | 0.6 | 0.1.7 | 0.1.8 | 0.1.9 | 0.2.2 | 1.0.0 | 2.0.0 | trunk |
延伸相關外掛(你可能也想知道)
Yoast SEO 》Yoast SEO:#1 WordPress SEO 外掛, 自 2008 年以來,Yoast SEO 幫助全球數百萬個網站在搜尋引擎中排名更高。, Yoast 的使命是為所有人提供 SEO 服務。我們的...。
Elementor Website Builder – More Than Just a Page Builder 》, 全球超過 1000 萬個網站的領先網站建立平台, Elementor 是專為 WordPress 設計的領先網站建立平台,使網站製作者能夠使用直覺式的視覺建立工具建立專業、像...。
Contact Form 7 》Contact Form 7 可以管理多個聯絡表單,並且您可以使用簡單的標記靈活地自訂表單和郵件內容。此表單支援 Ajax 提交、CAPTCHA、Akismet 垃圾郵件過濾等功能。,...。
Classic Editor 》Classic Editor 是由 WordPress 團隊維護的官方外掛程式,可還原之前(也就是「經典」)的 WordPress 編輯器和「編輯文章」畫面,使使用者可以使用延伸這個畫...。
WooCommerce 》p>WooCommerce是全球最受歡迎的開源電子商務解決方案之一,擁有世界上最多的市場份額。, 我們的核心平臺是免費的、靈活的,並擁有全球社區的支持。開源的自由...。
LiteSpeed Cache 》LiteSpeed Cache for WordPress(LSCWP)是一種全方位的網站加速外掛,包括獨家的伺服器層快取和一系列的優化功能。, LSCWP 支援 WordPress Multisite 及大多...。
WPForms – Easy Form Builder for WordPress – Contact Forms, Payment Forms, Surveys, & More 》f="https://wpforms.com/features/pre-built-form-templates/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin" rel="friend nofollow u...。
Akismet Anti-spam: Spam Protection 》Akismet會檢查您的評論和聯繫表單提交,將它們與全球垃圾郵件數據庫進行比對,以防止站點發佈惡意內容。您可以在部落格的“評論”管理畫面中檢查評論垃圾郵件的...。
Wordfence Security – Firewall, Malware Scan, and Login Security 》fective way to manage multiple WordPress sites with Wordfence installed from a single location., Monitor security status across all your sites from...。
Site Kit by Google – Analytics, Search Console, AdSense, Speed 》Site Kit是Google官方的WordPress外掛程式,提供有關人們如何尋找和使用您的網站的洞察。Site Kit是一站式解決方案,可部署、管理並獲取關鍵Google工具的見解...。
All-in-One WP Migration and Backup 》orage providers such as Dropbox, Google Drive, Amazon S3, and more, making it easy for you to securely store and access your website backups at any...。
WP Mail SMTP by WPForms – The Most Popular SMTP and Email Log Plugin 》WordPress Mail SMTP外掛, 如果您的WordPress網站無法正確發送電子郵件,您並不孤單。超過三百萬個網站使用WP Mail SMTP可靠地發送電子郵件。, 我們的目標是...。
Really Simple Security – Simple and Performant Security (formerly Really Simple SSL) 》le Plugins include Complianz GDPR, Disable Updates Manager, and Really Simple CAPTCHA., , Really Simple SSL是一個外掛,自動配置你的網站最大程度上使...。
Jetpack – WP Security, Backup, Speed, & Growth 》search engines, and grow your traffic with Jetpack. It’s the ultimate toolkit for WordPress professionals and beginners alike., , Customize and des...。
Yoast Duplicate Post 》這個 WordPress 外掛可以讓使用者複製任何類型 (type) 的文章,或將其複製到新的草稿 (draft) 以供進一步編輯。, 使用方法:, , , 在「編輯文章」或「編輯頁...。