WordPress.org

Plugin Directory

Confirm Publishing Actions

Prompts a user to click a confirm button whenever he tries to submit, publish, update, schedule or delete a post.

Where is the settings page?

There are currently no settings to configure, however with a little php magic you'll be able to do some customization (see below in this FAQ).

How do I change the text of the dialogue?

You can use a translation plugin or tool to modify the default text.

How do I translate %1$s? What does it mean?

%1$s is a placeholder that represents the singular name of a WordPress post type. You don't need to translate it, just copy and use it exactly as is.

How can I limit plugin functionality to a specific post type?

With get_post_type(), a native WordPress function, you can enable or disable plugin functionality for specific post types (such as post, page, or any other post type). For example, to disable functionality for 'Pages', paste the following code snippet in the functions.php file of your WordPress theme:

function cpa_pt_dequeue( $type )
{
    if ( is_plugin_active( 'confirm-publishing-actions/cpa.php' ) && class_exists( 'cpa_confirm_publishing_actions' ) )
    {
        global $post;
        $type = get_post_type( $post );
        if( 'page' != $type )
            return;
        wp_dequeue_script( 'cpa' );
    }
    return;
}
add_action( 'admin_enqueue_scripts', 'cpa_pt_dequeue' );

How can I limit plugin functionality to selected user roles?

With current_user_can(), a native WordPress function, you can enable or disable functionality for specific user roles, based on the capabilities assigned to them. For example, to disable functionality for admins only, paste the following code snippet in the functions.php file of your WordPress theme:

function cpa_cap_dequeue()
{
    if ( is_plugin_active( 'confirm-publishing-actions/cpa.php' ) && class_exists( 'cpa_confirm_publishing_actions' ) )
    {
        if( ! current_user_can( 'manage_options' ) )
            return;
        wp_dequeue_script( 'cpa' );
    }
    return;
}
add_action( 'admin_enqueue_scripts', 'cpa_cap_dequeue' );

Requires: 3.1 or higher
Compatible up to: 4.2.2
Last Updated: 2015-5-9
Active Installs: 400+

Ratings

5 out of 5 stars

Support

1 of 1 support threads in the last two months have been resolved.

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