Changeset 9641 for trunk/wp-admin/edit-page-form.php
- Timestamp:
- 11/12/2008 07:31:39 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-page-form.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-page-form.php
r9620 r9641 86 86 87 87 <div id="save-action"> 88 <?php if ( 'publish' != $post->post_status && ' private' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?>89 <input type="submit" name="save" id="save-post" value="<?php echo attribute_escape( __('Save Draft') ); ?>" tabindex="4" class="button button-highlighted" />88 <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> 89 <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" /> 90 90 <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> 91 91 <input type="submit" name="save" id="save-post" value="<?php echo attribute_escape( __('Save as Pending') ); ?>" tabindex="4" class="button button-highlighted" /> … … 107 107 <?php 108 108 switch ( $post->post_status ) { 109 case 'private': 110 _e('Privately Published'); 111 break; 109 112 case 'publish': 110 case 'private':111 113 _e('Published'); 112 114 break; … … 124 126 </span></b> 125 127 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> 126 <a href="#post_status" class="edit-post-status hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>128 <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> 127 129 128 130 <div id="post-status-select" class="hide-if-js"> 129 131 <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo $post->post_status; ?>" /> 130 132 <select name='post_status' id='post_status' tabindex='4'> 131 <?php if ( $post->post_status == 'publish' ) : ?> 132 <option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option> 133 <?php if ( 'publish' == $post->post_status ) : ?> 134 <option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option> 135 <?php elseif ( 'private' == $post->post_status ) : ?> 136 <option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e('Privately Published') ?></option> 133 137 <?php elseif ( 'future' == $post->post_status ) : ?> 134 138 <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option> … … 145 149 </div><?php // /misc-pub-section ?> 146 150 151 <div class="misc-pub-section " id="visibility"> 152 <?php _e('Visibility:'); ?> <b><span id="post-visibility-display"><?php 153 154 if ( !empty( $post->post_password ) ) { 155 $visibility = 'password'; 156 $visibility_trans = __('Password protected'); 157 } elseif ( 'private' == $post->post_status ) { 158 $visibility = 'private'; 159 $visibility_trans = __('Private'); 160 } else { 161 $visibility = 'public'; 162 $visibility_trans = __('Public'); 163 } 164 165 ?><?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> 166 167 <div id="post-visibility-select" class="hide-if-js"> 168 <input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo attribute_escape($post->post_password); ?>" /> 169 <input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo attribute_escape( $visibility ); ?>" /> 170 171 172 <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 /> 173 <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 /> 174 <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> 175 <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 /> 176 177 <p> 178 <a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e('OK'); ?></a> 179 <a href="#visibility" class="cancel-post-visibility hide-if-no-js"><?php _e('Cancel'); ?></a> 180 </p> 181 </div> 182 <?php } ?> 183 184 </div><?php // /misc-pub-section ?> 185 147 186 <?php 148 187 $datef = _c( 'M j, Y @ G:i|Publish box date format'); … … 150 189 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 151 190 $stamp = __('Scheduled for: <b>%1$s</b>'); 152 } else if ( 'publish' == $post->post_status ) { // already published191 } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published 153 192 $stamp = __('Published on: <b>%1$s</b>'); 154 193 } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified … … 189 228 <div id="publishing-action"> 190 229 <?php 191 if ( !in_array( $post->post_status, array('publish', 'future' ) ) || 0 == $post->ID ) { ?>230 if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { ?> 192 231 <?php if ( current_user_can('publish_posts') ) : ?> 193 232 <?php if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 233 <input name="original_publish" type="hidden" id="original_publish" value="<?php _e('Schedule') ?>" /> 194 234 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Schedule') ?>" /> 195 235 <?php else : ?> 236 <input name="original_publish" type="hidden" id="original_publish" value="<?php _e('Publish') ?>" /> 196 237 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 197 238 <?php endif; ?> 198 239 <?php else : ?> 240 <input name="original_publish" type="hidden" id="original_publish" value="<?php _e('Submit for Review') ?>" /> 199 241 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" /> 200 242 <?php endif; ?> 201 243 <?php } else { ?> 244 <input name="original_publish" type="hidden" id="original_publish" value="<?php _e('Update Page') ?>" /> 202 245 <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Update Page') ?>" /> 203 246 <?php } ?> … … 225 268 <?php 226 269 } 227 add_meta_box('pagepassworddiv', __('Privacy Options'), 'page_password_meta_box', 'page', 'side', 'core');270 // add_meta_box('pagepassworddiv', __('Privacy Options'), 'page_password_meta_box', 'page', 'side', 'core'); 228 271 229 272 /** … … 379 422 380 423 <div class="wrap"> 381 <h2><?php echo wp_specialchars( $title ); ?></h2> 424 <h2><?php echo wp_specialchars( $title ); ?></h2> 382 425 383 426 <form name="post" action="page.php" method="post" id="post">
Note: See TracChangeset
for help on using the changeset viewer.