PageRenderTime 46ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/plugins/usernoise/html/publish-meta-box.php

https://github.com/petergibbons/OpenCounterWP
PHP | 78 lines | 69 code | 8 blank | 1 comment | 7 complexity | 59e0ccba6491e1c8f1fc42284e09b767 MD5 | raw file
  1. <div class="submitbox" id="submitpost">
  2. <div id="minor-publishing">
  3. <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
  4. <div id="misc-publishing-actions">
  5. <div class="misc-pub-section<?php if ( !$can_publish ) { echo ' misc-pub-section-last'; } ?>"><label for="post_status"><?php _e('Status:') ?></label>
  6. <span id="post-status-display">
  7. <?php
  8. switch ( $post->post_status ) {
  9. case 'private':
  10. _e('Privately Published');
  11. break;
  12. case 'publish':
  13. _e('Reviewed', 'usernoise');
  14. break;
  15. case 'future':
  16. _e('Scheduled');
  17. break;
  18. case 'pending':
  19. _e('Pending Review', 'usernoise');
  20. break;
  21. case 'draft':
  22. case 'auto-draft':
  23. _e('Draft');
  24. break;
  25. }
  26. ?>
  27. </span>
  28. </div><?php // /misc-pub-section ?>
  29. <?php
  30. // translators: Publish box date formt, see http://php.net/date
  31. $datef = __( 'M j, Y @ G:i' );
  32. $stamp = __('Sent on: <b>%1$s</b>');
  33. $date = date_i18n( $datef, strtotime( $post->post_date ) );
  34. if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
  35. <div class="misc-pub-section curtime misc-pub-section-last">
  36. <span id="timestamp">
  37. <?php printf($stamp, $date); ?></span>
  38. </div><?php // /misc-pub-section ?>
  39. <?php endif; ?>
  40. <?php do_action('post_submitbox_misc_actions'); ?>
  41. </div>
  42. <div class="clear"></div>
  43. </div>
  44. <div id="major-publishing-actions">
  45. <?php do_action('post_submitbox_start'); ?>
  46. <div id="delete-action">
  47. <?php
  48. if ( current_user_can( "delete_post", $post->ID ) ) {
  49. if ( !EMPTY_TRASH_DAYS )
  50. $delete_text = __('Delete Permanently');
  51. else
  52. $delete_text = __('Move to Trash');
  53. ?>
  54. <a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php
  55. } ?>
  56. </div>
  57. <div id="publishing-action">
  58. <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="ajax-loading" alt="" />
  59. <?php if ($post->post_status == 'pending'): ?>
  60. <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" />
  61. <?php submit_button( __( 'Reviewed', 'usernoise' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?>
  62. <?php else: ?>
  63. <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" />
  64. <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('OK') ?>" />
  65. <?php endif ?>
  66. </div>
  67. <input name="un_redirect_back" value="<?php echo esc_attr(isset($_REQUEST['un_redirect_back']) ? $_REQUEST['un_redirect_back'] : $_SERVER['HTTP_REFERER']) ?>" type="hidden">
  68. <div class="clear"></div>
  69. </div>
  70. </div>