[WordPress] 外掛分享: Prepare New Version

首頁外掛目錄 › Prepare New Version
WordPress 外掛 Prepare New Version 的封面圖片
6,000+
安裝啟用
★★★★
4.8/5 分(6 則評價)
4207 天前
最後更新
問題解決
WordPress 3.5+ v1.0 上架:2013-09-24

內容簡介

有時候,幸福就是一些小事。你能夠在原始內容還在線上時,準備新版本內容如何呢?

預先準備一個已經在線上的文章的下一個版本,可以很快變成一個繁瑣且有風險的任務。事實上,大多數的出版商會創建一個全新的文章,填寫內容,當準備好後發佈,最後禁用原始文章。

基本功能:

一鍵創建文章的新版本;
直接訪問文章的其他待處理版本;
單擊更新文章到其新版本。

進階功能:

將文章複製成全新的獨立副本;
可掛接 😉
適用於任何文章類型,自定義或非自定義
自動煮咖啡(我們還在努力)

關於
掛鉤

pnv_duplicata_status_args
可用於更改發送到 ‘register_post_status’ 的引數的過濾器。
默認引數如下:

label =>副本

public => false

exclude_from_search => true

show_in_admin_all_list => false

label_count =>

單數 =>副本(%s)

複數 =>副本(%s)

pnv_erase_content_destination
可在觸發複製、複制或替換時更改 $destination 陣列之前,用於更改 $destination 陣列的過濾器 ‘wp_insert_post’
此過濾器發送另外三個參數:$source 對象(WP_Post 實例)和 $copy 布林值

pnv_filtered_metas
可在複製、複製或替換文章時更改不必處理的元名的過濾器
預設的 metas 是一個包含以下值的陣列:

_pnv_duplicata => true

pnv_erase_content
複製、複製或替換結束時觸發的操作。
此操作發送四個參數:

$source 對像(WP_Post 實例)

$destination 陣列(代表文章數據)

$copy 布林值

目標的文章 ID

pnv_action_url_redirect
可用於在複製、複製或替換之後更改重定向 URL 的過濾器。
預設值是目標文章的管理編輯頁面(已保存的文章)
此過濾器發送另外一個參數:目標文章 ID
pnv_column_name_column_value
可用於更改文章列表中 ‘{column_name}’ 列中顯示的值的過濾器。
此插件目前只帶有一個自定義列,‘duplicata’,因此 {column_name} 將始終是 ‘duplicata’,默認值將是文章的副本數。
此過濾器發送另外一個參數:文章 ID

感謝

該插件的原始版本是由 Lionel POINTET(https://github.com/lpointet)開發的,他仍在經常關注該項目。

非常感謝Groupe Moniteur,該開發的絕大部分目的是開發一個完全開源的插件。感謝未分類創作

外掛標籤

開發者團隊

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

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

原文外掛簡介

Sometimes happiness is about small things. What about being able to prepare a new version of your content while its original is still online?
Anticipating and preparing the next version of an article which is already online can quickly become a tedious and risky task. Indeed, most publishers will create a brand new post, fill it in, publish it once it’s ready and finally disable the original article.
Basic features:

creation of a new version of an article in 1 click;
direct access to other pending versions of an article;
update of an article to its new version in 1 click.

Advanced features:

duplication of an article into a brand new independent copy;
hookable 😉
works with any post types, custom or not
makes coffee (we’re still working on that)

About
Hooks
pnv_duplicata_status_args
Filter that can be used to alter arguments sent to ‘register_post_status’.
Default arguments are:

label => Duplicate

public => false

exclude_from_search => true

show_in_admin_all_list => false

label_count =>

singular => Duplicate (%s)

plural => Duplicates (%s)

pnv_erase_content_destination
Filter that can be used to alter $destination array before ‘wp_insert_post’ get called when a copy, duplication or replacement is triggered
This filter sends 3 other parameters: the $source object (WP_Post instance) and the $copy boolean
pnv_filtered_metas
Filter that can be used to alter meta names that must not be treated while a post is copied, duplicated or replaced
The default metas is an array with these values:

_pnv_duplicata => true

pnv_erase_content
Action triggered at the end of a copy, duplication or replacement.
This action sends 4 parameters:

the $source object (WP_Post instance)

the $destination array (represents post data)

the $copy boolean

the destination’s post ID

pnv_action_url_redirect
Filter that can be used to alter redirect URL after a copy, duplication or replacement.
The default value is the admin edit page for the destination post (the one that has been saved)
This filter sends 1 other parameter: the destination post ID
pnv_{column_name}_column_value
Filter that can be used to alter the value displayed on the posts list, in the ‘{column_name}’ column.
This plugin comes with only one custom column for now, ‘duplicata’, so {column_name} will always be ‘duplicata’, and the default value will be the count of duplicates for the post.
This filter sends 1 other parameter: the post ID
Thank’s
The original version of this plugin has been developed by Lionel POINTET (https://github.com/lpointet) who keeps following the project carefully.
A big thank-you to Groupe Moniteur for which a great part of this development was intended and which accepted enthusiastically to do a completely open source plugin from it. Thank you to Uncategorized Creations people, for their regular advice and their perseverance in making WordPress a leading CMS.
GLOBALIS
GLOBALIS is a web IT consulting company based in Paris, and a pioneer of the PHP and LAMP platform. Since 1997, we have been designing, making and maintaining Internet, intranet or mobile software. We have been working with open source CMS since 2000 and have regularly been using WordPress since 2007.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon