diff -r 2f6f6f7551ca -r 32102edaa81b web/wp-admin/includes/meta-boxes.php --- a/web/wp-admin/includes/meta-boxes.php Thu Sep 16 15:45:36 2010 +0000 +++ b/web/wp-admin/includes/meta-boxes.php Mon Nov 19 18:26:13 2012 +0100 @@ -13,7 +13,8 @@ global $action; $post_type = $post->post_type; - $can_publish = current_user_can("publish_${post_type}s"); + $post_type_object = get_post_type_object($post_type); + $can_publish = current_user_can($post_type_object->cap->publish_posts); ?>
+
+labels->separate_items_with_commas ); ?>
+ +- - 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category') ) ); ?> - - -
-+ + + + $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $tax->labels->parent_item . ' —', 'tab_index' => 3 ) ); ?> + + + +
+Learn more about manual excerpts.'); ?>
()
pingbacks, no other action necessary.'); ?>
+pingbacks, no other action necessary.'); ?>
use in your theme.'); ?>
+ + get_var($wpdb->prepare("SELECT count(1) FROM $wpdb->comments WHERE comment_post_ID = '%d' AND ( comment_approved = '0' OR comment_approved = '1')", $post_ID)); + $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); + $wp_list_table->display( true ); if ( 1 > $total ) { - echo '' . __('No comments yet.') . '
'; - return; + echo '' . __('No comments yet.') . '
'; + } else { + $hidden = get_hidden_meta_boxes( get_current_screen() ); + if ( ! in_array('commentsdiv', $hidden) ) { + ?> + + + + - - - - - - - + id, true, $post->post_type ); // TODO: ROLE SYSTEM - if ( $post->post_author && !in_array($post->post_author, $authors) ) - $authors[] = $post->post_author; + global $user_ID; ?> - $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> + 'authors', + 'name' => 'post_author_override', + 'selected' => empty($post->ID) ? $user_ID : $post->post_author, + 'include_selected' => true + ) ); } - /** * Display list of revisions. * @@ -464,7 +542,6 @@ wp_list_post_revisions(); } - // -- Page related Meta Boxes /** @@ -474,29 +551,45 @@ * * @param object $post */ -function page_attributes_meta_box($post){ +function page_attributes_meta_box($post) { + $post_type_object = get_post_type_object($post->post_type); + if ( $post_type_object->hierarchical ) { + $dropdown_args = array( + 'post_type' => $post->post_type, + 'exclude_tree' => $post->ID, + 'selected' => $post->post_parent, + 'name' => 'parent_id', + 'show_option_none' => __('(no parent)'), + 'sort_column' => 'menu_order, post_title', + 'echo' => 0, + ); + + $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); + $pages = wp_dropdown_pages( $dropdown_args ); + if ( ! empty($pages) ) { ?> - - - $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column'=> 'menu_order, post_title')); ?> - ++ + - + } // end empty pages check + } // end hierarchical check. + if ( 'page' == $post->post_type && 0 != count( get_page_templates() ) ) { + $template = !empty($post->page_template) ? $post->page_template : false; + ?> +
- - - - +
+ +
post_type ) _e( 'Need help? Use the Help tab in the upper right of your screen.' ); ?>
+ | + | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+ | + | ||||||||||||||||
- | + | + | + | ||||||||||||||
+ | + | ||||||||||||||||
+ | |||||||||||||||||
-
|
+ + | ||||||||||||||||
+ | + | ||||||||||||||||
+ | + |
XFN.'); ?>
-- | + |
---|
+ | |
---|---|
- | + |
+ | |
- | + |
+ | |
+ | |