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 plugin 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.)
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.
- Install via the built-in WordPress plugin installer. Or download and unzip
quick-drafts-access.zipinside the plugins directory for your site (typically
- Activate the plugin through the ‘Plugins’ admin menu in WordPress
Does that post type have any drafts? By default, the plugin does NOT display the drafts links if no drafts are present for that post type. This behavior can be overridden (see the Filters section).
The “All Drafts” link is always hidden for users who are responsible for all drafts of a given post type, assuming the “My Drafts” link is configured to be displayed (which it is by default).
Like the Posts and Pages admin tables in WordPress, the default behavior of the plugin is to not show the drafts link if none are present for the post type since there isn’t anything meaningful to link to. Bear in mind that the behavior can be overridden (see the Filters section).
Yes, which is why the plugin hides the “All Drafts” link when the “My Drafts” link is configured to be displayed (which it is by default) and the user is responsible for all of the drafts for a given post type.
Laguntzaileak eta Garatzaileak
“Quick Drafts Access” software librea da. Ondoko pertsonek egin dizkiote ekarpenak plugin honi.Laguntzaileak
Garapena interesatzen zaizu?
- New: Add DEVELOPER-DOCS.md and move hooks documentation into it
- Change: Only support public post types, but also exclude ‘attachment’
- Change: Improve and tweak developer documentation and code examples
- Change: Note compatibility through WP 5.8+
- Unit tests:
- New: Add
setUp(), namely to actually register post types
- Change: Test support for actual post types
- Change: Change
c2c_quick_drafts_access_post_types()to actual use the post types sent to it
- Change: Restructure unit test directories
- Change: Move
- Change: Move
- Change: Move unit test file into
- Change: Move
- Change: Remove ‘test-‘ prefix from unit test file
- Change: Rename
phpunit.xml.distper best practices
- Change: In bootstrap, store path to plugin file constant
- Change: In bootstrap, add backcompat for PHPUnit pre-v6.0
- New: Add
- New: Add a possible TODO item
- Fix: Fix plugin name defined in README.md
- Change: Note compatibility through WP 5.7+
- Change: Update copyright date (2021)
- This minor release fixes the post type support check to prevent display of dropdown for unsupported post types, adds a TODO.md file, updates a few URLs to be HTTPS, tweaks formatting of output markup, and notes compatibility through WP 5.4+.
- New: Add TODO.md and move existing TODO list from top of main plugin file into it
- Change: Use HTTPS for link to WP SVN repository in bin script for configuring unit tests
- Change: Note compatibility through WP 5.4+
- Change: Update links to coffee2code.com to be HTTPS
- Change: Unit tests: Remove unnecessary unregistering of hooks and thusly
Full changelog is available in CHANGELOG.md.