Changeset 35818 for trunk/src/wp-admin/includes/class-wp-list-table.php
- Timestamp:
- 12/07/2015 07:15:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-list-table.php
r35797 r35818 1038 1038 1039 1039 /** 1040 * If 'orderby' is set, return it.1041 *1042 * @access protected1043 * @since 4.4.01044 *1045 * @return string The value of 'orderby' or empty string.1046 */1047 protected function get_orderby() {1048 if ( isset( $_GET['orderby'] ) ) {1049 return $_GET['orderby'];1050 }1051 1052 return '';1053 }1054 1055 /**1056 * If 'order' is 'desc', return it. Else return 'asc'.1057 *1058 * @access protected1059 * @since 4.4.01060 *1061 * @return string 'desc' or 'asc'.1062 */1063 protected function get_order() {1064 if ( isset( $_GET['order'] ) && 'desc' === $_GET['order'] ) {1065 return 'desc';1066 }1067 1068 return 'asc';1069 }1070 1071 /**1072 1040 * Print column headers, accounting for hidden and sortable columns. 1073 1041 * … … 1085 1053 $current_url = remove_query_arg( 'paged', $current_url ); 1086 1054 1087 $current_orderby = $this->get_orderby(); 1088 $current_order = $this->get_order(); 1055 if ( isset( $_GET['orderby'] ) ) { 1056 $current_orderby = $_GET['orderby']; 1057 } else { 1058 $current_orderby = ''; 1059 } 1060 1061 if ( isset( $_GET['order'] ) && 'desc' === $_GET['order'] ) { 1062 $current_order = 'desc'; 1063 } else { 1064 $current_order = 'asc'; 1065 } 1089 1066 1090 1067 if ( ! empty( $columns['cb'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.