diff -r c7c34916027a -r 177826044cd9 wp/wp-admin/includes/meta-boxes.php --- a/wp/wp-admin/includes/meta-boxes.php Mon Oct 14 18:06:33 2019 +0200 +++ b/wp/wp-admin/includes/meta-boxes.php Mon Oct 14 18:28:13 2019 +0200 @@ -22,208 +22,228 @@ function post_submit_meta_box( $post, $args = array() ) { global $action; - $post_type = $post->post_type; - $post_type_object = get_post_type_object($post_type); - $can_publish = current_user_can($post_type_object->cap->publish_posts); -?> + $post_type = $post->post_type; + $post_type_object = get_post_type_object( $post_type ); + $can_publish = current_user_can( $post_type_object->cap->publish_posts ); + ?>
+ +
+ Learn more about manual excerpts.' ), __( 'https://codex.wordpress.org/Excerpt' ) ); -?>
- + + to_ping ) ) . '" aria-describedby="trackback-url-desc" />'; - if ('' != $post->pinged) { - $pings = ''. __('Already pinged:') . '
' . __( 'Already pinged:' ) . '
-
+ pingbacks, no other action necessary.' ), __( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' ) ); -?>
- + + +function post_custom_meta_box( $post ) { + ?>+ use in your theme.' ), __( 'https://codex.wordpress.org/Using_Custom_Fields' ) ); -?>
- + + +function post_comment_status_meta_box( $post ) { + ?> - - + $post->ID, 'number' => 1, 'count' => true ) ); - $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); + $total = get_comments( + array( + 'post_id' => $post->ID, + 'number' => 1, + 'count' => true, + ) + ); + $wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table' ); $wp_list_table->display( true ); if ( 1 > $total ) { - echo '' . __('No comments yet.') . '
'; + echo '' . __( 'No comments yet.' ) . '
'; } else { $hidden = get_hidden_meta_boxes( get_current_screen() ); - if ( ! in_array('commentsdiv', $hidden) ) { + if ( ! in_array( 'commentsdiv', $hidden ) ) { ?> - + post_name, $post ); -?> - -post_name, $post ); + ?> + + - - 'authors', - 'name' => 'post_author_override', - 'selected' => empty($post->ID) ? $user_ID : $post->post_author, - 'include_selected' => true, - 'show' => 'display_name_with_login', - ) ); + ?> + + 'authors', + 'name' => 'post_author_override', + 'selected' => empty( $post->ID ) ? $user_ID : $post->post_author, + 'include_selected' => true, + 'show' => 'display_name_with_login', + ) + ); } /** @@ -832,14 +895,14 @@ * * @param object $post */ -function page_attributes_meta_box($post) { +function page_attributes_meta_box( $post ) { if ( is_post_type_hierarchical( $post->post_type ) ) : $dropdown_args = array( 'post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', - 'show_option_none' => __('(no parent)'), + 'show_option_none' => __( '(no parent)' ), 'sort_column' => 'menu_order, post_title', 'echo' => 0, ); @@ -855,63 +918,66 @@ * @param WP_Post $post The current post. */ $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); - $pages = wp_dropdown_pages( $dropdown_args ); - if ( ! empty($pages) ) : -?> + $pages = wp_dropdown_pages( $dropdown_args ); + if ( ! empty( $pages ) ) : + ?> - - + 0 && get_option( 'page_for_posts' ) != $post->ID ) : $template = ! empty( $post->page_template ) ? $post->page_template : false; ?> - ++ +
-post_type, 'page-attributes' ) ) : ?> + post_type, 'page-attributes' ) ) : ?> - -post_type && get_current_screen()->get_help_tabs() ) : ?> + + post_type && get_current_screen()->get_help_tabs() ) : ?> - +function link_submit_meta_box( $link ) { + ?>