Ticket #4206: private-post-notification.diff

File private-post-notification.diff, 2.8 KB (added by JDTrower, 4 years ago)

Warn users when editing a private post and click publish that continuing will result in the post being public.

  • edit-form-advanced.php

     
    170170if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) { 
    171171?> 
    172172<?php if ( current_user_can('publish_posts') ) : ?> 
    173         <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 
     173        <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" onclick="if(document.forms.post.post_status[3].checked) return confirm('<?php _e('Are you sure you want your private post published for the world to see? (If not, try the Save button.)\n\nClick OK to continue publishing or Cancel to stop.') ?>'); else return true;" /> 
    174174<?php else : ?> 
    175175        <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" /> 
    176176<?php endif; ?> 
  • edit-form.php

     
    5757        <input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" /> 
    5858 
    5959         <?php if ( current_user_can('edit_posts') ) : ?> 
    60         <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="<?php _e('Publish') ?>" /> 
     60        <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="<?php _e('Publish') ?>" onclick="if(document.forms.post.post_status[3].checked) return confirm('<?php _e('Are you sure you want your private post published for the world to see? (If not, try the Save button.)\n\nClick OK to continue publishing or Cancel to stop.') ?>'); else return true;" /> 
    6161<?php endif; ?> 
    6262 
    6363<?php if ('bookmarklet' != $mode) { 
  • edit-page-form.php

     
    157157if ('publish' != $post->post_status || 0 == $post_ID): 
    158158?> 
    159159<?php if ( current_user_can('publish_pages') ) : ?> 
    160         <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 
     160        <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" onclick="if(document.forms.post.post_status[3].checked) return confirm('<?php _e('Are you sure you want your private post published for the world to see? (If not, try the Save button.)\n\nClick OK to continue publishing or Cancel to stop.') ?>'); else return true;" /> 
    161161<?php endif; endif;?> 
    162162<input name="referredby" type="hidden" id="referredby" value="<?php echo $sendto; ?>" /> 
    163163</p>