wp/wp-admin/includes/class-wp-posts-list-table.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
--- a/wp/wp-admin/includes/class-wp-posts-list-table.php	Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-admin/includes/class-wp-posts-list-table.php	Tue Dec 15 13:49:49 2020 +0100
@@ -67,7 +67,7 @@
 	 * @see WP_List_Table::__construct() for more information on default arguments.
 	 *
 	 * @global WP_Post_Type $post_type_object
-	 * @global wpdb         $wpdb
+	 * @global wpdb         $wpdb             WordPress database abstraction object.
 	 *
 	 * @param array $args An associative array of arguments.
 	 */
@@ -109,7 +109,8 @@
 			$_GET['author'] = get_current_user_id();
 		}
 
-		if ( 'post' === $post_type && $sticky_posts = get_option( 'sticky_posts' ) ) {
+		$sticky_posts = get_option( 'sticky_posts' );
+		if ( 'post' === $post_type && $sticky_posts ) {
 			$sticky_posts             = implode( ', ', array_map( 'absint', (array) $sticky_posts ) );
 			$this->sticky_posts_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = %s AND post_status NOT IN ('trash', 'auto-draft') AND ID IN ($sticky_posts)", $post_type ) );
 		}
@@ -134,15 +135,22 @@
 	}
 
 	/**
+	 * @global string   $mode             List table view mode.
 	 * @global array    $avail_post_stati
-	 * @global WP_Query $wp_query
+	 * @global WP_Query $wp_query         WordPress Query object.
 	 * @global int      $per_page
-	 * @global string   $mode
 	 */
 	public function prepare_items() {
-		global $avail_post_stati, $wp_query, $per_page, $mode;
+		global $mode, $avail_post_stati, $wp_query, $per_page;
 
-		// is going to call wp()
+		if ( ! empty( $_REQUEST['mode'] ) ) {
+			$mode = 'excerpt' === $_REQUEST['mode'] ? 'excerpt' : 'list';
+			set_user_setting( 'posts_list_mode', $mode );
+		} else {
+			$mode = get_user_setting( 'posts_list_mode', 'list' );
+		}
+
+		// Is going to call wp().
 		$avail_post_stati = wp_edit_posts_query();
 
 		$this->set_hierarchical_display( is_post_type_hierarchical( $this->screen->post_type ) && 'menu_order title' === $wp_query->query['orderby'] );
@@ -160,11 +168,11 @@
 		} else {
 			$post_counts = (array) wp_count_posts( $post_type, 'readable' );
 
-			if ( isset( $_REQUEST['post_status'] ) && in_array( $_REQUEST['post_status'], $avail_post_stati ) ) {
+			if ( isset( $_REQUEST['post_status'] ) && in_array( $_REQUEST['post_status'], $avail_post_stati, true ) ) {
 				$total_items = $post_counts[ $_REQUEST['post_status'] ];
 			} elseif ( isset( $_REQUEST['show_sticky'] ) && $_REQUEST['show_sticky'] ) {
 				$total_items = $this->sticky_posts_count;
-			} elseif ( isset( $_GET['author'] ) && $_GET['author'] == get_current_user_id() ) {
+			} elseif ( isset( $_GET['author'] ) && get_current_user_id() == $_GET['author'] ) {
 				$total_items = $this->user_posts_count;
 			} else {
 				$total_items = array_sum( $post_counts );
@@ -176,14 +184,7 @@
 			}
 		}
 
-		if ( ! empty( $_REQUEST['mode'] ) ) {
-			$mode = $_REQUEST['mode'] === 'excerpt' ? 'excerpt' : 'list';
-			set_user_setting( 'posts_list_mode', $mode );
-		} else {
-			$mode = get_user_setting( 'posts_list_mode', 'list' );
-		}
-
-		$this->is_trash = isset( $_REQUEST['post_status'] ) && $_REQUEST['post_status'] === 'trash';
+		$this->is_trash = isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'];
 
 		$this->set_pagination_args(
 			array(
@@ -243,7 +244,8 @@
 	protected function get_edit_link( $args, $label, $class = '' ) {
 		$url = add_query_arg( $args, 'edit.php' );
 
-		$class_html = $aria_current = '';
+		$class_html   = '';
+		$aria_current = '';
 		if ( ! empty( $class ) ) {
 			$class_html = sprintf(
 				' class="%s"',
@@ -303,6 +305,7 @@
 			);
 
 			$mine_inner_html = sprintf(
+				/* translators: %s: Number of posts. */
 				_nx(
 					'Mine <span class="count">(%s)</span>',
 					'Mine <span class="count">(%s)</span>',
@@ -323,6 +326,7 @@
 		}
 
 		$all_inner_html = sprintf(
+			/* translators: %s: Number of posts. */
 			_nx(
 				'All <span class="count">(%s)</span>',
 				'All <span class="count">(%s)</span>',
@@ -342,7 +346,7 @@
 
 			$status_name = $status->name;
 
-			if ( ! in_array( $status_name, $avail_post_stati ) || empty( $num_posts->$status_name ) ) {
+			if ( ! in_array( $status_name, $avail_post_stati, true ) || empty( $num_posts->$status_name ) ) {
 				continue;
 			}
 
@@ -372,6 +376,7 @@
 			);
 
 			$sticky_inner_html = sprintf(
+				/* translators: %s: Number of posts. */
 				_nx(
 					'Sticky <span class="count">(%s)</span>',
 					'Sticky <span class="count">(%s)</span>',
@@ -386,7 +391,7 @@
 			);
 
 			// Sticky comes after Publish, or if not listed, after All.
-			$split        = 1 + array_search( ( isset( $status_links['publish'] ) ? 'publish' : 'all' ), array_keys( $status_links ) );
+			$split        = 1 + array_search( ( isset( $status_links['publish'] ) ? 'publish' : 'all' ), array_keys( $status_links ), true );
 			$status_links = array_merge( array_slice( $status_links, 0, $split ), $sticky_link, array_slice( $status_links, $split ) );
 		}
 
@@ -410,7 +415,7 @@
 
 		if ( current_user_can( $post_type_obj->cap->delete_posts ) ) {
 			if ( $this->is_trash || ! EMPTY_TRASH_DAYS ) {
-				$actions['delete'] = __( 'Delete Permanently' );
+				$actions['delete'] = __( 'Delete permanently' );
 			} else {
 				$actions['trash'] = __( 'Move to Trash' );
 			}
@@ -464,17 +469,24 @@
 	 * @since 5.2.0
 	 * @access protected
 	 *
-	 * @param string $post_type Post type key.
+	 * @param string $post_type Post type slug.
 	 */
 	protected function formats_dropdown( $post_type ) {
 		/**
 		 * Filters whether to remove the 'Formats' drop-down from the post list table.
 		 *
 		 * @since 5.2.0
+		 * @since 5.5.0 The `$post_type` parameter was added.
 		 *
-		 * @param bool $disable Whether to disable the drop-down. Default false.
+		 * @param bool   $disable   Whether to disable the drop-down. Default false.
+		 * @param string $post_type Post type slug.
 		 */
-		if ( apply_filters( 'disable_formats_dropdown', false ) ) {
+		if ( apply_filters( 'disable_formats_dropdown', false, $post_type ) ) {
+			return;
+		}
+
+		// Return if the post type doesn't have post formats or if we're in the Trash.
+		if ( ! is_object_in_taxonomy( $post_type, 'post_format' ) || $this->is_trash ) {
 			return;
 		}
 
@@ -486,11 +498,8 @@
 			)
 		);
 
-		/*
-		 * Return if the post type doesn't have post formats, or there are no posts using formats,
-		 * or if we're in the trash.
-		 */
-		if ( ! is_object_in_taxonomy( $post_type, 'post_format' ) || ! $used_post_formats || $this->is_trash ) {
+		// Return if there are no posts using formats.
+		if ( ! $used_post_formats ) {
 			return;
 		}
 
@@ -525,7 +534,7 @@
 		?>
 		<div class="alignleft actions">
 		<?php
-		if ( 'top' === $which && ! is_singular() ) {
+		if ( 'top' === $which ) {
 			ob_start();
 
 			$this->months_dropdown( $this->screen->post_type );
@@ -586,10 +595,16 @@
 	}
 
 	/**
+	 * @global string $mode List table view mode.
+	 *
 	 * @return array
 	 */
 	protected function get_table_classes() {
-		return array( 'widefat', 'fixed', 'striped', is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' );
+		global $mode;
+
+		$mode_class = esc_attr( 'table-view-' . $mode );
+
+		return array( 'widefat', 'fixed', 'striped', $mode_class, is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' );
 	}
 
 	/**
@@ -602,7 +617,7 @@
 
 		$posts_columns['cb'] = '<input type="checkbox" />';
 
-		/* translators: manage posts column name */
+		/* translators: Posts screen column name. */
 		$posts_columns['title'] = _x( 'Title', 'column name' );
 
 		if ( post_type_supports( $post_type, 'author' ) ) {
@@ -639,7 +654,7 @@
 		}
 
 		$post_status = ! empty( $_REQUEST['post_status'] ) ? $_REQUEST['post_status'] : 'all';
-		if ( post_type_supports( $post_type, 'comments' ) && ! in_array( $post_status, array( 'pending', 'draft', 'future' ) ) ) {
+		if ( post_type_supports( $post_type, 'comments' ) && ! in_array( $post_status, array( 'pending', 'draft', 'future' ), true ) ) {
 			$posts_columns['comments'] = '<span class="vers comment-grey-bubble" title="' . esc_attr__( 'Comments' ) . '"><span class="screen-reader-text">' . __( 'Comments' ) . '</span></span>';
 		}
 
@@ -693,10 +708,10 @@
 	}
 
 	/**
-	 * @global WP_Query $wp_query
+	 * @global WP_Query $wp_query WordPress Query object.
 	 * @global int $per_page
 	 * @param array $posts
-	 * @param int $level
+	 * @param int   $level
 	 */
 	public function display_rows( $posts = array(), $level = 0 ) {
 		global $wp_query, $per_page;
@@ -716,7 +731,7 @@
 
 	/**
 	 * @param array $posts
-	 * @param int $level
+	 * @param int   $level
 	 */
 	private function _display_rows( $posts, $level = 0 ) {
 		$post_type = $this->screen->post_type;
@@ -738,11 +753,11 @@
 	}
 
 	/**
-	 * @global wpdb    $wpdb
-	 * @global WP_Post $post
+	 * @global wpdb    $wpdb WordPress database abstraction object.
+	 * @global WP_Post $post Global post object.
 	 * @param array $pages
-	 * @param int $pagenum
-	 * @param int $per_page
+	 * @param int   $pagenum
+	 * @param int   $per_page
 	 */
 	private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ) {
 		global $wpdb;
@@ -847,11 +862,11 @@
 	 * @since 4.2.0 Added the `$to_display` parameter.
 	 *
 	 * @param array $children_pages
-	 * @param int $count
-	 * @param int $parent
-	 * @param int $level
-	 * @param int $pagenum
-	 * @param int $per_page
+	 * @param int   $count
+	 * @param int   $parent
+	 * @param int   $level
+	 * @param int   $pagenum
+	 * @param int   $per_page
 	 * @param array $to_display List of pages to be displayed. Passed by reference.
 	 */
 	private function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page, &$to_display ) {
@@ -872,7 +887,7 @@
 				$my_parents = array();
 				$my_parent  = $page->post_parent;
 				while ( $my_parent ) {
-					// Get the ID from the list or the attribute if my_parent is an object
+					// Get the ID from the list or the attribute if my_parent is an object.
 					$parent_id = $my_parent;
 					if ( is_object( $my_parent ) ) {
 						$parent_id = $my_parent->ID;
@@ -901,7 +916,7 @@
 			$this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page, $to_display );
 		}
 
-		unset( $children_pages[ $parent ] ); //required in order to keep track of orphans
+		unset( $children_pages[ $parent ] ); // Required in order to keep track of orphans.
 	}
 
 	/**
@@ -915,9 +930,10 @@
 		if ( current_user_can( 'edit_post', $post->ID ) ) :
 			?>
 			<label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>">
-																				<?php
-																				printf( __( 'Select %s' ), _draft_or_post_title() );
-																				?>
+				<?php
+					/* translators: %s: Post title. */
+					printf( __( 'Select %s' ), _draft_or_post_title() );
+				?>
 			</label>
 			<input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
 			<div class="locked-indicator">
@@ -925,7 +941,7 @@
 				<span class="screen-reader-text">
 				<?php
 				printf(
-					/* translators: %s: post title */
+					/* translators: %s: Post title. */
 					__( '&#8220;%s&#8221; is locked' ),
 					_draft_or_post_title()
 				);
@@ -987,15 +1003,17 @@
 
 		$can_edit_post = current_user_can( 'edit_post', $post->ID );
 
-		if ( $can_edit_post && $post->post_status != 'trash' ) {
+		if ( $can_edit_post && 'trash' !== $post->post_status ) {
 			$lock_holder = wp_check_post_lock( $post->ID );
 
 			if ( $lock_holder ) {
 				$lock_holder   = get_userdata( $lock_holder );
 				$locked_avatar = get_avatar( $lock_holder->ID, 18 );
-				$locked_text   = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
+				/* translators: %s: User's display name. */
+				$locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
 			} else {
-				$locked_avatar = $locked_text = '';
+				$locked_avatar = '';
+				$locked_text   = '';
 			}
 
 			echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";
@@ -1006,11 +1024,11 @@
 
 		$title = _draft_or_post_title();
 
-		if ( $can_edit_post && $post->post_status != 'trash' ) {
+		if ( $can_edit_post && 'trash' !== $post->post_status ) {
 			printf(
 				'<a class="row-title" href="%s" aria-label="%s">%s%s</a>',
 				get_edit_post_link( $post->ID ),
-				/* translators: %s: post title */
+				/* translators: %s: Post title. */
 				esc_attr( sprintf( __( '&#8220;%s&#8221; (Edit)' ), $title ) ),
 				$pad,
 				$title
@@ -1030,7 +1048,10 @@
 		}
 		echo "</strong>\n";
 
-		if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'excerpt' === $mode && current_user_can( 'read_post', $post->ID ) ) {
+		if ( 'excerpt' === $mode
+			&& ! is_post_type_hierarchical( $this->screen->post_type )
+			&& current_user_can( 'read_post', $post->ID )
+		) {
 			if ( post_password_required( $post ) ) {
 				echo '<span class="protected-post-excerpt">' . esc_html( get_the_excerpt() ) . '</span>';
 			} else {
@@ -1054,20 +1075,20 @@
 		global $mode;
 
 		if ( '0000-00-00 00:00:00' === $post->post_date ) {
-			$t_time    = $h_time = __( 'Unpublished' );
+			$t_time    = __( 'Unpublished' );
 			$time_diff = 0;
 		} else {
-			$t_time = get_the_time( __( 'Y/m/d g:i:s a' ) );
-			$m_time = $post->post_date;
-			$time   = get_post_time( 'G', true, $post );
-
-			$time_diff = time() - $time;
+			$t_time = sprintf(
+				/* translators: 1: Post date, 2: Post time. */
+				__( '%1$s at %2$s' ),
+				/* translators: Post date format. See https://www.php.net/date */
+				get_the_time( __( 'Y/m/d' ), $post ),
+				/* translators: Post time format. See https://www.php.net/date */
+				get_the_time( __( 'g:i a' ), $post )
+			);
 
-			if ( $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) {
-				$h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
-			} else {
-				$h_time = mysql2date( __( 'Y/m/d' ), $m_time );
-			}
+			$time      = get_post_timestamp( $post );
+			$time_diff = time() - $time;
 		}
 
 		if ( 'publish' === $post->post_status ) {
@@ -1098,27 +1119,20 @@
 			echo $status . '<br />';
 		}
 
-		if ( 'excerpt' === $mode ) {
-			/**
-			 * Filters the published time of the post.
-			 *
-			 * If `$mode` equals 'excerpt', the published time and date are both displayed.
-			 * If `$mode` equals 'list' (default), the publish date is displayed, with the
-			 * time and date together available as an abbreviation definition.
-			 *
-			 * @since 2.5.1
-			 *
-			 * @param string  $t_time      The published time.
-			 * @param WP_Post $post        Post object.
-			 * @param string  $column_name The column name.
-			 * @param string  $mode        The list display mode ('excerpt' or 'list').
-			 */
-			echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode );
-		} else {
-
-			/** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */
-			echo '<abbr title="' . $t_time . '">' . apply_filters( 'post_date_column_time', $h_time, $post, 'date', $mode ) . '</abbr>';
-		}
+		/**
+		 * Filters the published time of the post.
+		 *
+		 * @since 2.5.1
+		 * @since 5.5.0 Removed the difference between 'excerpt' and 'list' modes.
+		 *              The published time and date are both displayed now,
+		 *              which is equivalent to the previous 'excerpt' mode.
+		 *
+		 * @param string  $t_time      The published time.
+		 * @param WP_Post $post        Post object.
+		 * @param string  $column_name The column name.
+		 * @param string  $mode        The list display mode ('excerpt' or 'list').
+		 */
+		echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode );
 	}
 
 	/**
@@ -1180,7 +1194,7 @@
 				$term_links = array();
 				foreach ( $terms as $t ) {
 					$posts_in_term_qv = array();
-					if ( 'post' != $post->post_type ) {
+					if ( 'post' !== $post->post_type ) {
 						$posts_in_term_qv['post_type'] = $post->post_type;
 					}
 					if ( $taxonomy_object->query_var ) {
@@ -1200,13 +1214,13 @@
 				 *
 				 * @since 5.2.0
 				 *
-				 * @param array  $term_links List of links to edit.php, filtered by the taxonomy term.
-				 * @param string $taxonomy   Taxonomy name.
-				 * @param array  $terms      Array of terms appearing in the post row.
+				 * @param string[]  $term_links Array of term editing links.
+				 * @param string    $taxonomy   Taxonomy name.
+				 * @param WP_Term[] $terms      Array of term objects appearing in the post row.
 				 */
 				$term_links = apply_filters( 'post_column_taxonomy_links', $term_links, $taxonomy, $terms );
 
-				/* translators: used between list items, there is a space after the comma */
+				/* translators: Used between list items, there is a space after the comma. */
 				echo join( __( ', ' ), $term_links );
 			} else {
 				echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . $taxonomy_object->labels->no_terms . '</span>';
@@ -1258,7 +1272,7 @@
 	}
 
 	/**
-	 * @global WP_Post $post
+	 * @global WP_Post $post Global post object.
 	 *
 	 * @param int|WP_Post $post
 	 * @param int         $level
@@ -1312,7 +1326,8 @@
 	 * @param object $post        Post being acted upon.
 	 * @param string $column_name Current column name.
 	 * @param string $primary     Primary column name.
-	 * @return string Row actions output for posts.
+	 * @return string Row actions output for posts, or an empty string
+	 *                if the current column is not the primary column.
 	 */
 	protected function handle_row_actions( $post, $column_name, $primary ) {
 		if ( $primary !== $column_name ) {
@@ -1324,11 +1339,11 @@
 		$actions          = array();
 		$title            = _draft_or_post_title();
 
-		if ( $can_edit_post && 'trash' != $post->post_status ) {
+		if ( $can_edit_post && 'trash' !== $post->post_status ) {
 			$actions['edit'] = sprintf(
 				'<a href="%s" aria-label="%s">%s</a>',
 				get_edit_post_link( $post->ID ),
-				/* translators: %s: post title */
+				/* translators: %s: Post title. */
 				esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ),
 				__( 'Edit' )
 			);
@@ -1336,7 +1351,7 @@
 			if ( 'wp_block' !== $post->post_type ) {
 				$actions['inline hide-if-no-js'] = sprintf(
 					'<button type="button" class="button-link editinline" aria-label="%s" aria-expanded="false">%s</button>',
-					/* translators: %s: post title */
+					/* translators: %s: Post title. */
 					esc_attr( sprintf( __( 'Quick edit &#8220;%s&#8221; inline' ), $title ) ),
 					__( 'Quick&nbsp;Edit' )
 				);
@@ -1348,7 +1363,7 @@
 				$actions['untrash'] = sprintf(
 					'<a href="%s" aria-label="%s">%s</a>',
 					wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&amp;action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ),
-					/* translators: %s: post title */
+					/* translators: %s: Post title. */
 					esc_attr( sprintf( __( 'Restore &#8220;%s&#8221; from the Trash' ), $title ) ),
 					__( 'Restore' )
 				);
@@ -1356,7 +1371,7 @@
 				$actions['trash'] = sprintf(
 					'<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
 					get_delete_post_link( $post->ID ),
-					/* translators: %s: post title */
+					/* translators: %s: Post title. */
 					esc_attr( sprintf( __( 'Move &#8220;%s&#8221; to the Trash' ), $title ) ),
 					_x( 'Trash', 'verb' )
 				);
@@ -1365,7 +1380,7 @@
 				$actions['delete'] = sprintf(
 					'<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
 					get_delete_post_link( $post->ID, '', true ),
-					/* translators: %s: post title */
+					/* translators: %s: Post title. */
 					esc_attr( sprintf( __( 'Delete &#8220;%s&#8221; permanently' ), $title ) ),
 					__( 'Delete Permanently' )
 				);
@@ -1373,22 +1388,22 @@
 		}
 
 		if ( is_post_type_viewable( $post_type_object ) ) {
-			if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) {
+			if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ), true ) ) {
 				if ( $can_edit_post ) {
 					$preview_link    = get_preview_post_link( $post );
 					$actions['view'] = sprintf(
 						'<a href="%s" rel="bookmark" aria-label="%s">%s</a>',
 						esc_url( $preview_link ),
-						/* translators: %s: post title */
+						/* translators: %s: Post title. */
 						esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $title ) ),
 						__( 'Preview' )
 					);
 				}
-			} elseif ( 'trash' != $post->post_status ) {
+			} elseif ( 'trash' !== $post->post_status ) {
 				$actions['view'] = sprintf(
 					'<a href="%s" rel="bookmark" aria-label="%s">%s</a>',
 					get_permalink( $post->ID ),
-					/* translators: %s: post title */
+					/* translators: %s: Post title. */
 					esc_attr( sprintf( __( 'View &#8220;%s&#8221;' ), $title ) ),
 					__( 'View' )
 				);
@@ -1399,7 +1414,7 @@
 			$actions['export'] = sprintf(
 				'<button type="button" class="wp-list-reusable-blocks__export button-link" data-id="%s" aria-label="%s">%s</button>',
 				$post->ID,
-				/* translators: %s: post title */
+				/* translators: %s: Post title. */
 				esc_attr( sprintf( __( 'Export &#8220;%s&#8221; as JSON' ), $title ) ),
 				__( 'Export as JSON' )
 			);
@@ -1458,6 +1473,7 @@
 		$taxonomy_names          = get_object_taxonomies( $screen->post_type );
 		$hierarchical_taxonomies = array();
 		$flat_taxonomies         = array();
+
 		foreach ( $taxonomy_names as $taxonomy_name ) {
 
 			$taxonomy = get_taxonomy( $taxonomy_name );
@@ -1498,7 +1514,8 @@
 
 		?>
 
-	<form method="get"><table style="display: none"><tbody id="inlineedit">
+		<form method="get">
+		<table style="display: none"><tbody id="inlineedit">
 		<?php
 		$hclass              = count( $hierarchical_taxonomies ) ? 'post' : 'page';
 		$inline_edit_classes = "inline-edit-row inline-edit-row-$hclass";
@@ -1506,345 +1523,358 @@
 		$quick_edit_classes  = "quick-edit-row quick-edit-row-$hclass inline-edit-{$screen->post_type}";
 
 		$bulk = 0;
-		while ( $bulk < 2 ) {
+		while ( $bulk < 2 ) :
+			$classes  = $inline_edit_classes . ' ';
+			$classes .= $bulk ? $bulk_edit_classes : $quick_edit_classes;
 			?>
+			<tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="<?php echo $classes; ?>" style="display: none">
+			<td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
+
+			<fieldset class="inline-edit-col-left">
+				<legend class="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
+				<div class="inline-edit-col">
+
+				<?php if ( post_type_supports( $screen->post_type, 'title' ) ) : ?>
+
+					<?php if ( $bulk ) : ?>
+
+						<div id="bulk-title-div">
+							<div id="bulk-titles"></div>
+						</div>
+
+					<?php else : // $bulk ?>
+
+						<label>
+							<span class="title"><?php _e( 'Title' ); ?></span>
+							<span class="input-text-wrap"><input type="text" name="post_title" class="ptitle" value="" /></span>
+						</label>
+
+						<?php if ( is_post_type_viewable( $screen->post_type ) ) : ?>
+
+							<label>
+								<span class="title"><?php _e( 'Slug' ); ?></span>
+								<span class="input-text-wrap"><input type="text" name="post_name" value="" /></span>
+							</label>
+
+						<?php endif; // is_post_type_viewable() ?>
+
+					<?php endif; // $bulk ?>
 
-		<tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="
-							<?php
-							echo $inline_edit_classes . ' ';
-							echo $bulk ? $bulk_edit_classes : $quick_edit_classes;
-							?>
-		" style="display: none"><td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
+				<?php endif; // post_type_supports( ... 'title' ) ?>
+
+				<?php if ( ! $bulk ) : ?>
+					<fieldset class="inline-edit-date">
+						<legend><span class="title"><?php _e( 'Date' ); ?></span></legend>
+						<?php touch_time( 1, 1, 0, 1 ); ?>
+					</fieldset>
+					<br class="clear" />
+				<?php endif; // $bulk ?>
+
+				<?php
+				if ( post_type_supports( $screen->post_type, 'author' ) ) :
+					$authors_dropdown = '';
 
-		<fieldset class="inline-edit-col-left">
-			<legend class="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
-			<div class="inline-edit-col">
-			<?php
+					if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
+						$users_opt = array(
+							'hide_if_only_one_author' => false,
+							'who'                     => 'authors',
+							'name'                    => 'post_author',
+							'class'                   => 'authors',
+							'multi'                   => 1,
+							'echo'                    => 0,
+							'show'                    => 'display_name_with_login',
+						);
 
-			if ( post_type_supports( $screen->post_type, 'title' ) ) :
-				if ( $bulk ) :
+						if ( $bulk ) {
+							$users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
+						}
+
+						$authors = wp_dropdown_users( $users_opt );
+						if ( $authors ) :
+							$authors_dropdown  = '<label class="inline-edit-author">';
+							$authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
+							$authors_dropdown .= $authors;
+							$authors_dropdown .= '</label>';
+						endif;
+					endif; // current_user_can( 'edit_others_posts' )
 					?>
-			<div id="bulk-title-div">
-				<div id="bulk-titles"></div>
-			</div>
-
-			<?php else : // $bulk ?>
-
-			<label>
-				<span class="title"><?php _e( 'Title' ); ?></span>
-				<span class="input-text-wrap"><input type="text" name="post_title" class="ptitle" value="" /></span>
-			</label>
-
-				<?php if ( is_post_type_viewable( $screen->post_type ) ) : // is_post_type_viewable check ?>
-
-			<label>
-				<span class="title"><?php _e( 'Slug' ); ?></span>
-				<span class="input-text-wrap"><input type="text" name="post_name" value="" /></span>
-			</label>
 
 					<?php
-	endif; // is_post_type_viewable check
-	endif; // $bulk
-	endif; // post_type_supports title
-			?>
-
-			<?php if ( ! $bulk ) : ?>
-			<fieldset class="inline-edit-date">
-			<legend><span class="title"><?php _e( 'Date' ); ?></span></legend>
-				<?php touch_time( 1, 1, 0, 1 ); ?>
-			</fieldset>
-			<br class="clear" />
-				<?php
-	endif; // $bulk
-
-			if ( post_type_supports( $screen->post_type, 'author' ) ) :
-				$authors_dropdown = '';
-
-				if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
-					$users_opt = array(
-						'hide_if_only_one_author' => false,
-						'who'                     => 'authors',
-						'name'                    => 'post_author',
-						'class'                   => 'authors',
-						'multi'                   => 1,
-						'echo'                    => 0,
-						'show'                    => 'display_name_with_login',
-					);
-					if ( $bulk ) {
-						$users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
+					if ( ! $bulk ) {
+						echo $authors_dropdown;
 					}
-
-					if ( $authors = wp_dropdown_users( $users_opt ) ) :
-						$authors_dropdown  = '<label class="inline-edit-author">';
-						$authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
-						$authors_dropdown .= $authors;
-						$authors_dropdown .= '</label>';
-					endif;
-				endif; // authors
+				endif; // post_type_supports( ... 'author' )
 				?>
 
-				<?php
-				if ( ! $bulk ) {
-					echo $authors_dropdown;}
-	endif; // post_type_supports author
+				<?php if ( ! $bulk && $can_publish ) : ?>
 
-			if ( ! $bulk && $can_publish ) :
-				?>
+					<div class="inline-edit-group wp-clearfix">
+						<label class="alignleft">
+							<span class="title"><?php _e( 'Password' ); ?></span>
+							<span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
+						</label>
 
-		<div class="inline-edit-group wp-clearfix">
-			<label class="alignleft">
-				<span class="title"><?php _e( 'Password' ); ?></span>
-				<span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
-			</label>
-
-			<em class="alignleft inline-edit-or">
-				<?php
-				/* translators: Between password field and private checkbox on post quick edit interface */
-				_e( '&ndash;OR&ndash;' );
-				?>
-				</em>
-				<label class="alignleft inline-edit-private">
-				<input type="checkbox" name="keep_private" value="private" />
-				<span class="checkbox-title"><?php _e( 'Private' ); ?></span>
-				</label>
-			</div>
+						<span class="alignleft inline-edit-or">
+							<?php
+							/* translators: Between password field and private checkbox on post quick edit interface. */
+							_e( '&ndash;OR&ndash;' );
+							?>
+						</span>
+						<label class="alignleft inline-edit-private">
+							<input type="checkbox" name="keep_private" value="private" />
+							<span class="checkbox-title"><?php _e( 'Private' ); ?></span>
+						</label>
+					</div>
 
 				<?php endif; ?>
 
-		</div></fieldset>
+				</div>
+			</fieldset>
 
 			<?php if ( count( $hierarchical_taxonomies ) && ! $bulk ) : ?>
 
-		<fieldset class="inline-edit-col-center inline-edit-categories"><div class="inline-edit-col">
-
-				<?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?>
-
-			<span class="title inline-edit-categories-label"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
-			<input type="hidden" name="<?php echo ( $taxonomy->name === 'category' ) ? 'post_category[]' : 'tax_input[' . esc_attr( $taxonomy->name ) . '][]'; ?>" value="0" />
-			<ul class="cat-checklist <?php echo esc_attr( $taxonomy->name ); ?>-checklist">
-					<?php wp_terms_checklist( null, array( 'taxonomy' => $taxonomy->name ) ); ?>
-			</ul>
-
-	<?php endforeach; //$hierarchical_taxonomies as $taxonomy ?>
-
-		</div></fieldset>
-
-	<?php endif; // count( $hierarchical_taxonomies ) && !$bulk ?>
-
-		<fieldset class="inline-edit-col-right"><div class="inline-edit-col">
-
-			<?php
-			if ( post_type_supports( $screen->post_type, 'author' ) && $bulk ) {
-				echo $authors_dropdown;
-			}
-
-			if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) :
+				<fieldset class="inline-edit-col-center inline-edit-categories">
+					<div class="inline-edit-col">
 
-				if ( $post_type_object->hierarchical ) :
-					?>
-		<label>
-			<span class="title"><?php _e( 'Parent' ); ?></span>
-					<?php
-					$dropdown_args = array(
-						'post_type'         => $post_type_object->name,
-						'selected'          => $post->post_parent,
-						'name'              => 'post_parent',
-						'show_option_none'  => __( 'Main Page (no parent)' ),
-						'option_none_value' => 0,
-						'sort_column'       => 'menu_order, post_title',
-					);
-
-					if ( $bulk ) {
-						$dropdown_args['show_option_no_change'] = __( '&mdash; No Change &mdash;' );
-					}
-
-					/**
-					 * Filters the arguments used to generate the Quick Edit page-parent drop-down.
-					 *
-					 * @since 2.7.0
-					 *
-					 * @see wp_dropdown_pages()
-					 *
-					 * @param array $dropdown_args An array of arguments.
-					 */
-					$dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
-
-					wp_dropdown_pages( $dropdown_args );
-					?>
-		</label>
-
-					<?php
-				endif; // hierarchical
-
-				if ( ! $bulk ) :
-					?>
-
-			<label>
-				<span class="title"><?php _e( 'Order' ); ?></span>
-				<span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order; ?>" /></span>
-			</label>
-
-					<?php
-				endif; // !$bulk
-		endif; // page-attributes
-			?>
+					<?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?>
 
-			<?php if ( 0 < count( get_page_templates( null, $screen->post_type ) ) ) : ?>
-		<label>
-			<span class="title"><?php _e( 'Template' ); ?></span>
-			<select name="page_template">
-				<?php	if ( $bulk ) : ?>
-				<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
-				<?php	endif; // $bulk ?>
-				<?php
-				/** This filter is documented in wp-admin/includes/meta-boxes.php */
-				$default_title = apply_filters( 'default_page_template_title', __( 'Default Template' ), 'quick-edit' );
-				?>
-				<option value="default"><?php echo esc_html( $default_title ); ?></option>
-				<?php page_template_dropdown( '', $screen->post_type ); ?>
-			</select>
-		</label>
-	<?php endif; ?>
+						<span class="title inline-edit-categories-label"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
+						<input type="hidden" name="<?php echo ( 'category' === $taxonomy->name ) ? 'post_category[]' : 'tax_input[' . esc_attr( $taxonomy->name ) . '][]'; ?>" value="0" />
+						<ul class="cat-checklist <?php echo esc_attr( $taxonomy->name ); ?>-checklist">
+							<?php wp_terms_checklist( null, array( 'taxonomy' => $taxonomy->name ) ); ?>
+						</ul>
 
-			<?php if ( count( $flat_taxonomies ) && ! $bulk ) : ?>
-
-				<?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
-					<?php
-					if ( current_user_can( $taxonomy->cap->assign_terms ) ) :
-						$taxonomy_name = esc_attr( $taxonomy->name );
-
-						?>
-			<label class="inline-edit-tags">
-				<span class="title"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
-				<textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo $taxonomy_name; ?>]" class="tax_input_<?php echo $taxonomy_name; ?>"></textarea>
-			</label>
-					<?php endif; ?>
-
-	<?php endforeach; //$flat_taxonomies as $taxonomy ?>
-
-	<?php endif; // count( $flat_taxonomies ) && !$bulk ?>
+					<?php endforeach; // $hierarchical_taxonomies as $taxonomy ?>
 
-			<?php
-			if ( post_type_supports( $screen->post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) :
-				if ( $bulk ) :
-					?>
+					</div>
+				</fieldset>
 
-			<div class="inline-edit-group wp-clearfix">
-					<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
-			<label class="alignleft">
-				<span class="title"><?php _e( 'Comments' ); ?></span>
-				<select name="comment_status">
-					<option value=""><?php _e( '&mdash; No Change &mdash;' ); ?></option>
-					<option value="open"><?php _e( 'Allow' ); ?></option>
-					<option value="closed"><?php _e( 'Do not allow' ); ?></option>
-				</select>
-			</label>
-		<?php endif; if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
-			<label class="alignright">
-				<span class="title"><?php _e( 'Pings' ); ?></span>
-				<select name="ping_status">
-					<option value=""><?php _e( '&mdash; No Change &mdash;' ); ?></option>
-					<option value="open"><?php _e( 'Allow' ); ?></option>
-					<option value="closed"><?php _e( 'Do not allow' ); ?></option>
-				</select>
-			</label>
-		<?php endif; ?>
-			</div>
+			<?php endif; // count( $hierarchical_taxonomies ) && ! $bulk ?>
 
-			<?php else : // $bulk ?>
-
-			<div class="inline-edit-group wp-clearfix">
-				<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
-				<label class="alignleft">
-					<input type="checkbox" name="comment_status" value="open" />
-					<span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span>
-				</label>
-			<?php endif; if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
-				<label class="alignleft">
-					<input type="checkbox" name="ping_status" value="open" />
-					<span class="checkbox-title"><?php _e( 'Allow Pings' ); ?></span>
-				</label>
-			<?php endif; ?>
-			</div>
+			<fieldset class="inline-edit-col-right">
+				<div class="inline-edit-col">
 
 				<?php
-	endif; // $bulk
-	endif; // post_type_supports comments or pings
-			?>
-
-			<div class="inline-edit-group wp-clearfix">
-				<label class="inline-edit-status alignleft">
-					<span class="title"><?php _e( 'Status' ); ?></span>
-					<select name="_status">
-			<?php if ( $bulk ) : ?>
-						<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
-	<?php endif; // $bulk ?>
-					<?php if ( $can_publish ) : // Contributors only get "Unpublished" and "Pending Review" ?>
-						<option value="publish"><?php _e( 'Published' ); ?></option>
-						<option value="future"><?php _e( 'Scheduled' ); ?></option>
-						<?php if ( $bulk ) : ?>
-						<option value="private"><?php _e( 'Private' ); ?></option>
-	<?php endif; // $bulk ?>
-					<?php endif; ?>
-						<option value="pending"><?php _e( 'Pending Review' ); ?></option>
-						<option value="draft"><?php _e( 'Draft' ); ?></option>
-					</select>
-				</label>
-
-			<?php if ( 'post' === $screen->post_type && $can_publish && current_user_can( $post_type_object->cap->edit_others_posts ) ) : ?>
-
-				<?php	if ( $bulk ) : ?>
-
-				<label class="alignright">
-					<span class="title"><?php _e( 'Sticky' ); ?></span>
-					<select name="sticky">
-						<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
-						<option value="sticky"><?php _e( 'Sticky' ); ?></option>
-						<option value="unsticky"><?php _e( 'Not Sticky' ); ?></option>
-					</select>
-				</label>
-
-	<?php	else : // $bulk ?>
-
-				<label class="alignleft">
-					<input type="checkbox" name="sticky" value="sticky" />
-					<span class="checkbox-title"><?php _e( 'Make this post sticky' ); ?></span>
-				</label>
-
-	<?php	endif; // $bulk ?>
-
-	<?php endif; // 'post' && $can_publish && current_user_can( 'edit_others_cap' ) ?>
-
-			</div>
-
-			<?php
-
-			if ( $bulk && current_theme_supports( 'post-formats' ) && post_type_supports( $screen->post_type, 'post-formats' ) ) {
-				$post_formats = get_theme_support( 'post-formats' );
-
-				?>
-		<label class="alignleft">
-		<span class="title"><?php _ex( 'Format', 'post format' ); ?></span>
-		<select name="post_format">
-			<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
-			<option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
-				<?php
-				if ( is_array( $post_formats[0] ) ) {
-					foreach ( $post_formats[0] as $format ) {
-						?>
-					<option value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
-						<?php
-					}
+				if ( post_type_supports( $screen->post_type, 'author' ) && $bulk ) {
+					echo $authors_dropdown;
 				}
 				?>
-		</select></label>
-				<?php
+
+				<?php if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) : ?>
+
+					<?php if ( $post_type_object->hierarchical ) : ?>
+
+						<label>
+							<span class="title"><?php _e( 'Parent' ); ?></span>
+							<?php
+							$dropdown_args = array(
+								'post_type'         => $post_type_object->name,
+								'selected'          => $post->post_parent,
+								'name'              => 'post_parent',
+								'show_option_none'  => __( 'Main Page (no parent)' ),
+								'option_none_value' => 0,
+								'sort_column'       => 'menu_order, post_title',
+							);
+
+							if ( $bulk ) {
+								$dropdown_args['show_option_no_change'] = __( '&mdash; No Change &mdash;' );
+							}
+
+							/**
+							 * Filters the arguments used to generate the Quick Edit page-parent drop-down.
+							 *
+							 * @since 2.7.0
+							 *
+							 * @see wp_dropdown_pages()
+							 *
+							 * @param array $dropdown_args An array of arguments.
+							 */
+							$dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
+
+							wp_dropdown_pages( $dropdown_args );
+							?>
+						</label>
+
+					<?php endif; // hierarchical ?>
+
+					<?php if ( ! $bulk ) : ?>
+
+						<label>
+							<span class="title"><?php _e( 'Order' ); ?></span>
+							<span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order; ?>" /></span>
+						</label>
+
+					<?php endif; // ! $bulk ?>
+
+				<?php endif; // post_type_supports( ... 'page-attributes' ) ?>
+
+				<?php if ( 0 < count( get_page_templates( null, $screen->post_type ) ) ) : ?>
+
+					<label>
+						<span class="title"><?php _e( 'Template' ); ?></span>
+						<select name="page_template">
+							<?php if ( $bulk ) : ?>
+							<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
+							<?php endif; // $bulk ?>
+							<?php
+							/** This filter is documented in wp-admin/includes/meta-boxes.php */
+							$default_title = apply_filters( 'default_page_template_title', __( 'Default template' ), 'quick-edit' );
+							?>
+							<option value="default"><?php echo esc_html( $default_title ); ?></option>
+							<?php page_template_dropdown( '', $screen->post_type ); ?>
+						</select>
+					</label>
+
+				<?php endif; ?>
+
+				<?php if ( count( $flat_taxonomies ) && ! $bulk ) : ?>
+
+					<?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
+
+						<?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) : ?>
+							<?php $taxonomy_name = esc_attr( $taxonomy->name ); ?>
+
+							<label class="inline-edit-tags">
+								<span class="title"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
+								<textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo $taxonomy_name; ?>]" class="tax_input_<?php echo $taxonomy_name; ?>"></textarea>
+							</label>
+
+						<?php endif; // current_user_can( 'assign_terms' ) ?>
+
+					<?php endforeach; // $flat_taxonomies as $taxonomy ?>
+
+				<?php endif; // count( $flat_taxonomies ) && ! $bulk ?>
+
+				<?php if ( post_type_supports( $screen->post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
+
+					<?php if ( $bulk ) : ?>
+
+						<div class="inline-edit-group wp-clearfix">
+
+						<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
+
+							<label class="alignleft">
+								<span class="title"><?php _e( 'Comments' ); ?></span>
+								<select name="comment_status">
+									<option value=""><?php _e( '&mdash; No Change &mdash;' ); ?></option>
+									<option value="open"><?php _e( 'Allow' ); ?></option>
+									<option value="closed"><?php _e( 'Do not allow' ); ?></option>
+								</select>
+							</label>
+
+						<?php endif; ?>
+
+						<?php if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
 
-			}
+							<label class="alignright">
+								<span class="title"><?php _e( 'Pings' ); ?></span>
+								<select name="ping_status">
+									<option value=""><?php _e( '&mdash; No Change &mdash;' ); ?></option>
+									<option value="open"><?php _e( 'Allow' ); ?></option>
+									<option value="closed"><?php _e( 'Do not allow' ); ?></option>
+								</select>
+							</label>
+
+						<?php endif; ?>
+
+						</div>
+
+					<?php else : // $bulk ?>
+
+						<div class="inline-edit-group wp-clearfix">
+
+						<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
+
+							<label class="alignleft">
+								<input type="checkbox" name="comment_status" value="open" />
+								<span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span>
+							</label>
+
+						<?php endif; ?>
+
+						<?php if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
+
+							<label class="alignleft">
+								<input type="checkbox" name="ping_status" value="open" />
+								<span class="checkbox-title"><?php _e( 'Allow Pings' ); ?></span>
+							</label>
+
+						<?php endif; ?>
+
+						</div>
+
+					<?php endif; // $bulk ?>
+
+				<?php endif; // post_type_supports( ... comments or pings ) ?>
+
+					<div class="inline-edit-group wp-clearfix">
+
+						<label class="inline-edit-status alignleft">
+							<span class="title"><?php _e( 'Status' ); ?></span>
+							<select name="_status">
+								<?php if ( $bulk ) : ?>
+									<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
+								<?php endif; // $bulk ?>
 
-			?>
+								<?php if ( $can_publish ) : // Contributors only get "Unpublished" and "Pending Review". ?>
+									<option value="publish"><?php _e( 'Published' ); ?></option>
+									<option value="future"><?php _e( 'Scheduled' ); ?></option>
+									<?php if ( $bulk ) : ?>
+										<option value="private"><?php _e( 'Private' ); ?></option>
+									<?php endif; // $bulk ?>
+								<?php endif; ?>
+
+								<option value="pending"><?php _e( 'Pending Review' ); ?></option>
+								<option value="draft"><?php _e( 'Draft' ); ?></option>
+							</select>
+						</label>
+
+						<?php if ( 'post' === $screen->post_type && $can_publish && current_user_can( $post_type_object->cap->edit_others_posts ) ) : ?>
+
+							<?php if ( $bulk ) : ?>
+
+								<label class="alignright">
+									<span class="title"><?php _e( 'Sticky' ); ?></span>
+									<select name="sticky">
+										<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
+										<option value="sticky"><?php _e( 'Sticky' ); ?></option>
+										<option value="unsticky"><?php _e( 'Not Sticky' ); ?></option>
+									</select>
+								</label>
+
+							<?php else : // $bulk ?>
 
-		</div></fieldset>
+								<label class="alignleft">
+									<input type="checkbox" name="sticky" value="sticky" />
+									<span class="checkbox-title"><?php _e( 'Make this post sticky' ); ?></span>
+								</label>
+
+							<?php endif; // $bulk ?>
+
+						<?php endif; // 'post' && $can_publish && current_user_can( 'edit_others_posts' ) ?>
+
+					</div>
+
+				<?php if ( $bulk && current_theme_supports( 'post-formats' ) && post_type_supports( $screen->post_type, 'post-formats' ) ) : ?>
+					<?php $post_formats = get_theme_support( 'post-formats' ); ?>
+
+					<label class="alignleft">
+						<span class="title"><?php _ex( 'Format', 'post format' ); ?></span>
+						<select name="post_format">
+							<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
+							<option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
+							<?php if ( is_array( $post_formats[0] ) ) : ?>
+								<?php foreach ( $post_formats[0] as $format ) : ?>
+									<option value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
+								<?php endforeach; ?>
+							<?php endif; ?>
+						</select>
+					</label>
+
+				<?php endif; ?>
+
+				</div>
+			</fieldset>
 
 			<?php
 			list( $columns ) = $this->get_column_info();
@@ -1861,8 +1891,8 @@
 					 *
 					 * @since 2.7.0
 					 *
-					 * @param string  $column_name Name of the column to edit.
-					 * @param WP_Post $post_type   The post type slug.
+					 * @param string $column_name Name of the column to edit.
+					 * @param string $post_type   The post type slug.
 					 */
 					do_action( 'bulk_edit_custom_box', $column_name, $screen->post_type );
 				} else {
@@ -1874,41 +1904,44 @@
 					 *
 					 * @param string $column_name Name of the column to edit.
 					 * @param string $post_type   The post type slug, or current screen name if this is a taxonomy list table.
-					 * @param string taxonomy     The taxonomy name, if any.
+					 * @param string $taxonomy    The taxonomy name, if any.
 					 */
 					do_action( 'quick_edit_custom_box', $column_name, $screen->post_type, '' );
 				}
 			}
 			?>
-		<div class="submit inline-edit-save">
-			<button type="button" class="button cancel alignleft"><?php _e( 'Cancel' ); ?></button>
-			<?php
-			if ( ! $bulk ) {
-				wp_nonce_field( 'inlineeditnonce', '_inline_edit', false );
-				?>
-				<button type="button" class="button button-primary save alignright"><?php _e( 'Update' ); ?></button>
-				<span class="spinner"></span>
-				<?php
-			} else {
-				submit_button( __( 'Update' ), 'primary alignright', 'bulk_edit', false );
-			}
-			?>
-			<input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" />
-			<input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" />
-			<?php if ( ! $bulk && ! post_type_supports( $screen->post_type, 'author' ) ) { ?>
-				<input type="hidden" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" />
-			<?php } ?>
-			<br class="clear" />
-			<div class="notice notice-error notice-alt inline hidden">
-				<p class="error"></p>
+
+			<div class="submit inline-edit-save">
+				<button type="button" class="button cancel alignleft"><?php _e( 'Cancel' ); ?></button>
+
+				<?php if ( ! $bulk ) : ?>
+					<?php wp_nonce_field( 'inlineeditnonce', '_inline_edit', false ); ?>
+					<button type="button" class="button button-primary save alignright"><?php _e( 'Update' ); ?></button>
+					<span class="spinner"></span>
+				<?php else : ?>
+					<?php submit_button( __( 'Update' ), 'primary alignright', 'bulk_edit', false ); ?>
+				<?php endif; ?>
+
+				<input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" />
+				<input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" />
+				<?php if ( ! $bulk && ! post_type_supports( $screen->post_type, 'author' ) ) : ?>
+					<input type="hidden" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" />
+				<?php endif; ?>
+				<br class="clear" />
+
+				<div class="notice notice-error notice-alt inline hidden">
+					<p class="error"></p>
+				</div>
 			</div>
-		</div>
-		</td></tr>
+
+			</td></tr>
+
 			<?php
 			$bulk++;
-		}
+		endwhile;
 		?>
-		</tbody></table></form>
+		</tbody></table>
+		</form>
 		<?php
 	}
 }