equal
deleted
inserted
replaced
623 } |
623 } |
624 } |
624 } |
625 |
625 |
626 echo "</select>\n"; |
626 echo "</select>\n"; |
627 |
627 |
628 submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two" ) ); |
628 submit_button( __( 'Apply' ), 'action', 'bulk_action', false, array( 'id' => "doaction$two" ) ); |
629 echo "\n"; |
629 echo "\n"; |
630 } |
630 } |
631 |
631 |
632 /** |
632 /** |
633 * Gets the current action selected from the bulk actions dropdown. |
633 * Gets the current action selected from the bulk actions dropdown. |
761 |
761 |
762 if ( ! $month_count || ( 1 === $month_count && 0 === (int) $months[0]->month ) ) { |
762 if ( ! $month_count || ( 1 === $month_count && 0 === (int) $months[0]->month ) ) { |
763 return; |
763 return; |
764 } |
764 } |
765 |
765 |
766 $m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0; |
766 $selected_month = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0; |
767 ?> |
767 ?> |
768 <label for="filter-by-date" class="screen-reader-text"><?php echo get_post_type_object( $post_type )->labels->filter_by_date; ?></label> |
768 <label for="filter-by-date" class="screen-reader-text"><?php echo get_post_type_object( $post_type )->labels->filter_by_date; ?></label> |
769 <select name="m" id="filter-by-date"> |
769 <select name="m" id="filter-by-date"> |
770 <option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option> |
770 <option<?php selected( $selected_month, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option> |
771 <?php |
771 <?php |
772 foreach ( $months as $arc_row ) { |
772 foreach ( $months as $arc_row ) { |
773 if ( 0 === (int) $arc_row->year ) { |
773 if ( 0 === (int) $arc_row->year ) { |
774 continue; |
774 continue; |
775 } |
775 } |
777 $month = zeroise( $arc_row->month, 2 ); |
777 $month = zeroise( $arc_row->month, 2 ); |
778 $year = $arc_row->year; |
778 $year = $arc_row->year; |
779 |
779 |
780 printf( |
780 printf( |
781 "<option %s value='%s'>%s</option>\n", |
781 "<option %s value='%s'>%s</option>\n", |
782 selected( $m, $year . $month, false ), |
782 selected( $selected_month, $year . $month, false ), |
783 esc_attr( $arc_row->year . $month ), |
783 esc_attr( $year . $month ), |
784 /* translators: 1: Month name, 2: 4-digit year. */ |
784 /* translators: 1: Month name, 2: 4-digit year. */ |
785 sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year ) |
785 esc_html( sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year ) ) |
786 ); |
786 ); |
787 } |
787 } |
788 ?> |
788 ?> |
789 </select> |
789 </select> |
790 <?php |
790 <?php |
1716 echo '</td></tr>'; |
1716 echo '</td></tr>'; |
1717 } |
1717 } |
1718 } |
1718 } |
1719 |
1719 |
1720 /** |
1720 /** |
1721 * Generates the table rows. |
1721 * Generates the list table rows. |
1722 * |
1722 * |
1723 * @since 3.1.0 |
1723 * @since 3.1.0 |
1724 */ |
1724 */ |
1725 public function display_rows() { |
1725 public function display_rows() { |
1726 foreach ( $this->items as $item ) { |
1726 foreach ( $this->items as $item ) { |