
內容簡介
在 WordPress 中,預設進入後台某一種基本文章(包括文章和頁面)的草稿清單需要進行多次點擊。如果要按照特定使用者篩選草稿,通常需要額外進行某些不明顯的手動 URL 修改。
這個外掛可讓你透過主要後台選單,一鍵存取所有草稿,以及只查看你自己的草稿。
此外,外掛提供了在連結中顯示該種基本文章目前草稿數量的功能(例如連結可以顯示為 “所有草稿(3)”,表示該基本文章類型中有三個草稿,而 “我的草稿(1)” 則表示你只有一個草稿)。
當使用者負責某一個特定基本文章類型的所有草稿時(且通過 hook 未禁用 “我的草稿” 連結),此時將只會顯示 “我的草稿” 連結。在這種情況下,同時顯示 “所有草稿” 和 “我的草稿” 連結是冗余的。此行為還可以確保只有一個連結存在於單作者博客中。
另外,只有具有編輯該基本文章類型職能的使用者才會看到草稿連結。
當該基本文章類型沒有相關草稿時,外掛會隱藏兩種草稿連結。有關如何覆寫此行為的方法,請參閱“過濾器”章節。外掛還提供了禁用顯示 “所有草稿” 或 “我的草稿” 連結的功能。
在僅包含草稿文章的外掛管理清單中,本外掛還在表格上方添加了一個下拉選單,可以按照所選的草稿作者來過濾列表。(只有實際擁有草稿文章的使用者才包含在下拉選單中。)
連結: 外掛主頁 | 外掛目錄頁面 | GitHub | 作者主頁
開發人員文件
開發人員文件可在 DEVELOPER-DOCS.md 中找到。該文件涵蓋了該外掛提供的眾多 hook。以下列出了這些 hook,以提供其可用性概述。
c2c_quick_drafts_access_post_types:自定義顯示草稿連結的文章類型列表
c2c_quick_drafts_access_show_all_drafts_menu_link:自定義是否為某個文章類型顯示“所有草稿”連結。
c2c_quick_drafts_access_show_my_drafts_menu_link:自定義是否為某個文章類型顯示“我的草稿”連結。
c2c_quick_drafts_access_show_if_empty:自定義當該基本文章類型當前沒有草稿時,是否顯示“所有草稿”和/或“我的草稿”連結。
c2c_quick_drafts_access_disable_filter_dropdown:從草稿文章列表中移除“草稿篩選”下拉選單。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
By default in WordPress, accessing the drafts listing of any given post type (including posts and pages) in the admin requires multiple clicks. Then filtering the drafts listing by a particular user (generally to view only your drafts) additionally requires some non-obvious manual URL hacking.
This plugin allows you one click access to all drafts, as well as to just your drafts, of each post type via the main admin menu.
In addition, the plugin provides a count of the number of current drafts for that post type in the link (i.e. the link could read “All Drafts (3)” to indicate there are three drafts for that post type, and “My Drafts (1)” to indicate you only have one draft for that post type).
When the user is responsible for all of the drafts of a given post type (and the “My Drafts” link is not disabled via a hook) then only the “My Drafts” links will appear. It would be redundant to show both the “All Drafts” and “My Drafts” links in this situation. This behavior also ensures only one link is present for single-author blogs.
Also, the draft link(s) only appear for users who have the capability to edit posts of that post type.
The plugin hides the two types of draft links when no related drafts for that post type are present. See the Filters section for how to override this behavior. Filters are also provided to disable the plugin from ever showing the “All Drafts” or the “My Drafts” links.
On admin listings of only draft posts, this plugin also adds a dropdown above the table that allows for the listing to be filtered by the selected draft author. (Only users who actually have a draft post are included in the dropdown.)
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
Developer Documentation
Developer documentation can be found in DEVELOPER-DOCS.md. That documentation covers the numerous hooks provided by the plugin. Those hooks are listed below to provide an overview of what’s available.
c2c_quick_drafts_access_post_types : Customize the list of post_types for which the draft links will be shown
c2c_quick_drafts_access_show_all_drafts_menu_link : Customize whether the ‘All Drafts’ link will appear at all for a post type.
c2c_quick_drafts_access_show_my_drafts_menu_link : Customize whether the ‘My Drafts’ link will appear at all for a post type.
c2c_quick_drafts_access_show_if_empty : Customize whether the ‘All Drafts’ and/or ‘My Drafts’ links will appear for a post type when that post type currently has no drafts.
c2c_quick_drafts_access_disable_filter_dropdown : removal of the ‘Drafts By’ dropdown from drafts post list table.
