WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Quick Drafts Access

Adds a link to Drafts under the Posts, Pages, and other custom post type sections in the admin menu.

Filters

The plugin is further customizable via two filters. Typically, these customizations would be put into your active theme's functions.php file, or used by another plugin.

c2c_quick_drafts_access_post_types

The 'c2c_quick_drafts_access_post_types' filter allows you to customize the list of post_types for which a 'Drafts' link will be shown. By default, a 'Drafts' link will be shown for all public post types, which includes the default post types of 'post' and 'page'. If other post types have been added to your site, they will also automatically be taken into consideration. If you want to explicitly add or remove particular post types, use this filter.

Arguments:

  • $post_types (array): Array of post type objects

Example:

add_filter( 'c2c_quick_drafts_access_post_types', 'my_qda_mods' );
function my_qda_mods( $post_types ) {
    $acceptable_post_types = array();
    foreach ( $post_types as $post_type ) {
        // Don't show the Drafts link for 'event' post type
        if ( !in_array( $post_type->name, array( 'event' ) ) ) // More post types can be added to this array
            $acceptable_post_types[] = $post_type;
    }
    return $acceptable_post_types;
}

c2c_quick_drafts_access_show_if_empty

The 'c2c_quick_drafts_access_show_if_empty' filter allows you to customize whether the 'Drafts' link will appear for a post type when that post type currently has no drafts.

Arguments:

  • $show (bool): The default boolean indicating if the Drafts link should be shown if the post type does not have any drafts. Default is false.
  • $post_type_name (string): The post_type name
  • $post_type (object): The post_type object

Example:

// Show the link to Drafts even if no drafts exist for the post type.
add_filter( 'c2c_quick_drafts_access_show_if_empty', '__return_true' );

Requires: 3.1 or higher
Compatible up to: 3.8.3
Last Updated: 2013-12-20
Downloads: 3,520

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,1,1
100,1,1
100,1,1