40 | | <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> |
41 | | <input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" class="button" /> |
| 40 | <?php |
| 41 | $btnHideArray = array("publish","future","private"); |
| 42 | |
| 43 | if ( !in_array( $post->post_status, $btnHideArray ) ) |
| 44 | { |
| 45 | $phrase = 'Save '.ucfirst($post->post_status); |
| 46 | echo '<input type="submit" name="save" id="save-post" value="'. __($phrase) .'" class="button" />'; |
| 47 | } |
| 48 | ?> |
80 | | switch ( $post->post_status ) { |
81 | | case 'private': |
82 | | _e('Privately Published'); |
83 | | break; |
84 | | case 'publish': |
85 | | _e('Published'); |
86 | | break; |
87 | | case 'future': |
88 | | _e('Scheduled'); |
89 | | break; |
90 | | case 'pending': |
91 | | _e('Pending Review'); |
92 | | break; |
93 | | case 'draft': |
94 | | case 'auto-draft': |
95 | | _e('Draft'); |
96 | | break; |
97 | | } |
| 83 | |
| 84 | global $wp_post_statuses, $allowed_post_status; |
| 85 | |
| 86 | foreach($wp_post_statuses as $key => $wp_post_status){ |
| 87 | if($key == $post->post_status && $wp_post_status->show_in_admin_status_list){ |
| 88 | $allowed_post_status = true; |
| 89 | echo __($wp_post_status->label); |
| 90 | } |
| 91 | elseif($key == $post->post_status){ |
| 92 | $allowed_post_status = false; |
| 93 | echo __($wp_post_status->label); |
| 94 | } |
| 95 | } |
106 | | <?php if ( 'publish' == $post->post_status ) : ?> |
107 | | <option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option> |
108 | | <?php elseif ( 'private' == $post->post_status ) : ?> |
109 | | <option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e('Privately Published') ?></option> |
110 | | <?php elseif ( 'future' == $post->post_status ) : ?> |
111 | | <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option> |
112 | | <?php endif; ?> |
113 | | <option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option> |
114 | | <?php if ( 'auto-draft' == $post->post_status ) : ?> |
115 | | <option<?php selected( $post->post_status, 'auto-draft' ); ?> value='draft'><?php _e('Draft') ?></option> |
116 | | <?php else : ?> |
117 | | <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Draft') ?></option> |
118 | | <?php endif; ?> |
| 104 | <?php |
| 105 | $ppf = array('publish','private','future'); |
| 106 | $ad = array('auto-draft','draft'); |
| 107 | $adSet = false; |
| 108 | |
| 109 | foreach($wp_post_statuses as $key => $wp_post_status){ |
| 110 | $show = false; |
| 111 | if($wp_post_status->show_in_admin_status_list){ |
| 112 | if(in_array($key, $ppf)){ |
| 113 | // Show just one of those |
| 114 | if($post->post_status == $key){ |
| 115 | $show = true; |
| 116 | } |
| 117 | } elseif($key == 'trash'){ |
| 118 | // Don't show |
| 119 | $show = false; |
| 120 | } else{ |
| 121 | $show = true; |
| 122 | } |
| 123 | |
| 124 | if($show){ |
| 125 | echo "<option ".selected( $post->post_status, $key, false )." value='".$key."'>". __($wp_post_status->label) ."</option>"; |
| 126 | } |
| 127 | } |
| 128 | } |
| 129 | ?> |