Ticket #6964: 6964.diff
File 6964.diff, 9.0 KB (added by , 17 years ago) |
---|
-
wp-admin/edit-form-advanced.php
347 347 $authors[] = $post->post_author; 348 348 if ( $authors && count( $authors ) > 1 ) : 349 349 function post_author_meta_box($post) { 350 global $current_user, $user_ID; 351 $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM 352 if ( $post->post_author && !in_array($post->post_author, $authors) ) 353 $authors[] = $post->post_author; 350 354 ?> 351 <label class="hidden" for="post_author_override"><?php _e('Post Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post _ID) ? $user_ID : $post->post_author) ); ?>355 <label class="hidden" for="post_author_override"><?php _e('Post Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> 352 356 <?php 353 357 } 354 358 add_meta_box('authordiv', __('Post Author'), 'post_author_meta_box', 'post', 'advanced', 'core'); -
wp-admin/edit-page-form.php
199 199 200 200 <h2><?php _e('Advanced Options'); ?></h2> 201 201 202 <div id="pagepostcustom" class="postbox <?php echo postbox_classes('pagepostcustom', 'page'); ?>"> 203 <h3><?php _e('Custom Fields') ?></h3> 204 <div class="inside"> 202 203 <?php 204 function page_custom_meta_box($post){ 205 ?> 205 206 <div id="postcustomstuff"> 206 207 <table cellpadding="3"> 207 208 <?php 208 $metadata = has_meta($post _ID);209 $metadata = has_meta($post->ID); 209 210 list_meta($metadata); 210 211 ?> 211 212 … … 216 217 <div id="ajax-response"></div> 217 218 </div> 218 219 <p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p> 219 </div> 220 </div> 220 <?php 221 } 222 add_meta_box('pagecustomdiv', __('Custom Fields'), 'page_custom_meta_box', 'page', 'advanced', 'core'); 221 223 222 <div id="pagecommentstatusdiv" class="postbox <?php echo postbox_classes('pagecommentstatusdiv', 'page'); ?>"> 223 <h3><?php _e('Comments & Pings') ?></h3> 224 <div class="inside"> 224 function page_comments_status_meta_box($post){ 225 ?> 225 226 <input name="advanced_view" type="hidden" value="1" /> 226 227 <p><label for="comment_status" class="selectit"> 227 228 <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> 228 229 <?php _e('Allow Comments') ?></label></p> 229 230 <p><label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label></p> 230 231 <p><?php _e('These settings apply to this page only. “Pings” are <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a>.'); ?></p> 231 </div> 232 </div> 232 <?php 233 } 234 add_meta_box('pagecommentstatusdiv', __('Comments & Pings'), 'page_comments_status_meta_box', 'page', 'advanced', 'core'); 233 235 234 <div id="pagepassworddiv" class="postbox <?php echo postbox_classes('pagepassworddiv', 'page'); ?>"> 235 <h3><?php _e('Password Protect This Page') ?></h3> 236 <div class="inside"> 236 function page_password_meta_box($post){ 237 ?> 237 238 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Page') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></p> 238 239 <p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this page and its comments.'); ?></p> 239 </div> 240 </div> 240 <?php 241 } 242 add_meta_box('pagepassworddiv', __('Password Protect This Page'), 'page_password_meta_box', 'page', 'advanced', 'core'); 241 243 242 <div id="pageslugdiv" class="postbox <?php echo postbox_classes('pageslugdiv', 'page'); ?>"> 243 <h3><?php _e('Page Slug') ?></h3> 244 <div class="inside"> 244 function page_slug_meta_box($post){ 245 ?> 245 246 <label class="hidden" for="post_name"><?php _e('Page Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" /> 246 </div> 247 </div> 247 <?php 248 } 249 add_meta_box('pageslugdiv', __('Page Slug'), 'page_slug_meta_box', 'page', 'advanced', 'core'); 248 250 249 <div id="pageparentdiv" class="postbox <?php echo postbox_classes('pageparentdiv', 'page'); ?>"> 250 <h3><?php _e('Page Parent') ?></h3>251 < div class="inside">252 < label class="hidden" for="parent_id"><?php _e('Page Parent') ?></label><select name="parent_id" id="parent_id">251 function page_parent_meta_box($post){ 252 ?> 253 <label class="hidden" for="parent_id"><?php _e('Page Parent') ?></label> 254 <select name="parent_id" id="parent_id"> 253 255 <option value='0'><?php _e('Main Page (no parent)'); ?></option> 254 256 <?php parent_dropdown($post->post_parent); ?> 255 257 </select> 256 258 <p><?php _e('You can arrange your pages in hierarchies, for example you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how deeply nested you can make pages.'); ?></p> 257 </div> 258 </div> 259 <?php 260 } 261 add_meta_box('pageparentdiv', __('Page Parent'), 'page_parent_meta_box', 'page', 'advanced', 'core'); 259 262 260 <?php if ( 0 != count( get_page_templates() ) ) { ?> 261 <div id="pagetemplatediv" class="postbox <?php echo postbox_classes('pagetemplatediv', 'page'); ?>"> 262 <h3><?php _e('Page Template') ?></h3> 263 <div class="inside"> 263 if ( 0 != count( get_page_templates() ) ) { 264 function page_template_meta_box($post){ 265 ?> 264 266 <label class="hidden" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template"> 265 267 <option value='default'><?php _e('Default Template'); ?></option> 266 268 <?php page_template_dropdown($post->page_template); ?> 267 269 </select> 268 270 <p><?php _e('Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them above.'); ?></p> 269 </div> 270 </div> 271 <?php } ?> 271 <?php 272 } 273 add_meta_box('pagetemplatediv', __('Page Template'), 'page_template_meta_box', 'page', 'advanced', 'core'); 274 } 272 275 273 <div id="pageorderdiv" class="postbox <?php echo postbox_classes('pageorderdiv', 'page'); ?>"> 274 <h3><?php _e('Page Order') ?></h3> 275 <div class="inside"> 276 function page_order_meta_box($post){ 277 ?> 276 278 <p><label class="hidden" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo $post->menu_order ?>" /></p> 277 279 <p><?php _e('Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in. (We know this is a little janky, it’ll be better in future releases.)'); ?></p> 278 </div> 279 </div> 280 <?php 281 } 282 add_meta_box('pageorderdiv', __('Page Order'), 'page_order_meta_box', 'page', 'advanced', 'core'); 280 283 281 <?php 284 282 285 $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM 283 286 if ( $post->post_author && !in_array($post->post_author, $authors) ) 284 287 $authors[] = $post->post_author; 285 if ( $authors && count( $authors ) > 1 ) : 288 if ( $authors && count( $authors ) > 1 ) { 289 function page_author_meta_box($post){ 290 global $current_user, $user_ID; 291 $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM 292 if ( $post->post_author && !in_array($post->post_author, $authors) ) 293 $authors[] = $post->post_author; 286 294 ?> 287 <div id="pageauthordiv" class="postbox <?php echo postbox_classes('pageauthordiv', 'page'); ?>"> 288 <h3><?php _e('Page Author'); ?></h3> 289 <div class="inside"> 290 <label class="hidden" for="post_author_override"><?php _e('Page Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post_ID) ? $user_ID : $post->post_author) ); ?> 291 </div> 292 </div> 293 <?php endif; ?> 295 <label class="hidden" for="post_author_override"><?php _e('Page Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> 296 <?php 297 } 298 add_meta_box('pageauthordiv', __('Page Author'), 'page_author_meta_box', 'page', 'advanced', 'core'); 299 } 294 300 295 <?php if ( isset($post_ID) && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) : ?>296 <div id="revisionsdiv" class="postbox <?php echo postbox_classes('revisionsdiv', 'page'); ?>">297 <h3><?php _e('Page Revisions'); ?></h3>298 <div class="inside">299 <?php wp_list_post_revisions(); ?>300 </div>301 </div>302 <?php endif; ?>303 301 302 if ( isset($post_ID) && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) : 303 function page_revisions_meta_box($post) { 304 wp_list_post_revisions(); 305 } 306 add_meta_box('revisionsdiv', __('Page Revisions'), 'page_revisions_meta_box', 'page', 'advanced', 'core'); 307 endif; 304 308 305 <?php do_meta_boxes('page', 'advanced', $post); ?> 309 do_meta_boxes('page', 'advanced', $post); 310 ?> 306 311 307 312 </div> 308 313 </div>