• Hi,

    As soon as the publish button is clicked, the post gets published. As Save & Publish are one beside the other, sometimes inadvertently the publish button may be clicked (I did this once for a premier website & all the hell broke loose) Is there a way to have one more step before publishing like “Are you sure, you want to publish?” (Certainly this will give breather space)

    Any help will be greatly appreciated

    Regards,
    Chirag

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there,
    you could use a simple plugin like this one:

    <?php
    /*
    Plugin Name: Confirm publish
    */
    $c_message = 'Are you sure you want to publish?'; // your confirm message
    function confirm_publish(){
    	global $c_message;
    	echo '
    <script type="text/javascript"><!--
    var publish = document.getElementById("publish");
    if (publish !== null) publish.onclick = function(){
    	return confirm("'.$c_message.'");
    };
    // --></script>';
    }
    
    add_action('admin_footer', 'confirm_publish');
    ?>

    Save the code in a file named confirm-publish.php and put the file in wp-content/plugins. Activate it through the admin panel and you’re done :).

    /Lingonberg

    Is there a way when pressing publish I can make it goto a page where it display what the author just posted? so they can review it, and have two buttons with “Go back” and “Yes, Publish it”?

    I want to add a script to the publish process which reads if there is any external links, it will then visit those links to see if they work. If they dont its gonna force the user to go back to the previous page, if its ok then it will go ahead and publish it and return to the edit page like it usually does.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Publish Confirmation’ is closed to new replies.