Ticket #4206: 4206b.diff

File 4206b.diff, 2.5 KB (added by Nazgul, 5 years ago)
  • wp-admin/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 to publish a private post?') ?>'); 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; ?> 
  • wp-admin/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 to publish a private post?') ?>'); else return true;" /> 
    6161<?php endif; ?> 
    6262 
    6363<?php if ('bookmarklet' != $mode) { 
  • wp-admin/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 to publish a private post?') ?>'); else return true;" /> 
    161161<?php endif; endif;?> 
    162162<input name="referredby" type="hidden" id="referredby" value="<?php echo $sendto; ?>" /> 
    163163</p>