Changeset 9639 for trunk/wp-admin/edit-form-advanced.php
- Timestamp:
- 11/12/2008 06:36:48 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-form-advanced.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r9620 r9639 93 93 94 94 <div id="save-action"> 95 <?php if ( 'publish' != $post->post_status && ' private' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?>96 <input type="submit" name="save" id="save-post" value="<?php echo attribute_escape( __('Save Draft') ); ?>" tabindex="4" class="button button-highlighted" />95 <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> 96 <input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php echo attribute_escape( __('Save Draft') ); ?>" tabindex="4" class="button button-highlighted" /> 97 97 <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> 98 98 <input type="submit" name="save" id="save-post" value="<?php echo attribute_escape( __('Save as Pending') ); ?>" tabindex="4" class="button button-highlighted" /> … … 114 114 <?php 115 115 switch ( $post->post_status ) { 116 case 'private': 117 _e('Privately Published'); 118 break; 116 119 case 'publish': 117 case 'private':118 120 _e('Published'); 119 121 break; … … 131 133 </span></b> 132 134 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> 133 <a href="#post_status" class="edit-post-status hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>135 <a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 134 136 135 137 <div id="post-status-select" class="hide-if-js"> 136 138 <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo $post->post_status; ?>" /> 137 139 <select name='post_status' id='post_status' tabindex='4'> 138 <?php if ( $post->post_status == 'publish' ) : ?> 139 <option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option> 140 <?php if ( 'publish' == $post->post_status ) : ?> 141 <option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option> 142 <?php elseif ( 'private' == $post->post_status ) : ?> 143 <option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e('Privately Published') ?></option> 140 144 <?php elseif ( 'future' == $post->post_status ) : ?> 141 145 <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option> … … 151 155 </div><?php // /misc-pub-section ?> 152 156 153 154 <?php if ( $can_publish && current_user_can( 'edit_others_posts' ) ) { ?> 155 <div class="misc-pub-section " id="sticky-checkbox"> 156 <input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked(is_sticky($post->ID), true); ?> tabindex="4" /> <label for="sticky" class="selectit"><?php _e('Stick this post to the front page') ?></label> 157 <div class="misc-pub-section " id="visibility"> 158 <?php _e('Visibility:'); ?> <b><span id="post-visibility-display"><?php 159 160 if ( !empty( $post->post_password ) ) { 161 $visibility = 'password'; 162 $visibility_trans = __('Password protected'); 163 } elseif ( 'private' == $post->post_status ) { 164 $visibility = 'private'; 165 $visibility_trans = __('Private'); 166 } elseif ( is_sticky( $post->ID ) ) { 167 $visibility = 'public'; 168 $visibility_trans = __('Public, sticky'); 169 $sticky = 'sticky'; 170 } else { 171 $visibility = 'public'; 172 $visibility_trans = __('Public'); 173 } 174 175 ?><?php echo wp_specialchars( $visibility_trans ); ?></span></b> <?php if ( $can_publish ) { ?> <a href="#visibility" class="edit-visibility hide-if-no-js"><?php _e('Edit'); ?></a> 176 177 <div id="post-visibility-select" class="hide-if-js"> 178 <input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo attribute_escape($post->post_password); ?>" /> 179 <input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked(is_sticky($post->ID), true); ?> /> 180 <input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo attribute_escape( $visibility ); ?>" /> 181 182 183 <input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e('Public'); ?></label><br /> 184 <span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked(is_sticky($post->ID), true); ?> tabindex="4" /> <label for="sticky" class="selectit"><?php _e('Stick this post to the front page') ?></label><br /></span> 185 <input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e('Password protected'); ?></label><br /> 186 <span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo attribute_escape($post->post_password); ?>" /><br /></span> 187 <input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br /> 188 189 <p> 190 <a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e('OK'); ?></a> 191 <a href="#visibility" class="cancel-post-visibility hide-if-no-js"><?php _e('Cancel'); ?></a> 192 </p> 193 </div> 194 <?php } ?> 195 157 196 </div><?php // /misc-pub-section ?> 158 <?php } ?>159 197 160 198 … … 164 202 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 165 203 $stamp = __('Scheduled for: <b>%1$s</b>'); 166 } else if ( 'publish' == $post->post_status ) { // already published204 } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published 167 205 $stamp = __('Published on: <b>%1$s</b>'); 168 206 } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified … … 203 241 <div id="publishing-action"> 204 242 <?php 205 if ( !in_array( $post->post_status, array('publish', 'future' ) ) || 0 == $post->ID ) { ?>243 if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { ?> 206 244 <?php if ( current_user_can('publish_posts') ) : ?> 207 245 <?php if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 246 <input name="original_publish" type="hidden" id="original_publish" value="<?php _e('Schedule') ?>" /> 208 247 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Schedule') ?>" /> 209 248 <?php else : ?> 249 <input name="original_publish" type="hidden" id="original_publish" value="<?php _e('Publish') ?>" /> 210 250 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 211 251 <?php endif; ?> 212 252 <?php else : ?> 253 <input name="original_publish" type="hidden" id="original_publish" value="<?php _e('Submit for Review') ?>" /> 213 254 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" /> 214 255 <?php endif; ?> 215 256 <?php } else { ?> 257 <input name="original_publish" type="hidden" id="original_publish" value="<?php _e('Update Post') ?>" /> 216 258 <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Update Post') ?>" /> 217 259 <?php } ?> … … 301 343 <?php 302 344 } 303 add_meta_box('passworddiv', __('Privacy Options'), 'post_password_meta_box', 'post', 'side', 'core');345 // add_meta_box('passworddiv', __('Privacy Options'), 'post_password_meta_box', 'post', 'side', 'core'); 304 346 305 347 /**
Note: See TracChangeset
for help on using the changeset viewer.