Changeset 34383 for trunk/src/wp-admin/includes/class-wp-list-table.php
- Timestamp:
- 09/22/2015 06:05:39 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-list-table.php
r34229 r34383 284 284 */ 285 285 public function get_pagination_arg( $key ) { 286 if ( 'page' == $key )286 if ( 'page' === $key ) { 287 287 return $this->get_pagenum(); 288 289 if ( isset( $this->_pagination_args[$key] ) ) 288 } 289 290 if ( isset( $this->_pagination_args[$key] ) ) { 290 291 return $this->_pagination_args[$key]; 292 } 291 293 } 292 294 … … 441 443 442 444 foreach ( $this->_actions as $name => $title ) { 443 $class = 'edit' == $name ? ' class="hide-if-no-js"' : '';445 $class = 'edit' === $name ? ' class="hide-if-no-js"' : ''; 444 446 445 447 echo "\t<option value='$name'$class>$title</option>\n"; … … 599 601 foreach ( $this->modes as $mode => $title ) { 600 602 $classes = array( 'view-' . $mode ); 601 if ( $current_mode == $mode )603 if ( $current_mode === $mode ) 602 604 $classes[] = 'current'; 603 605 printf( … … 783 785 } 784 786 785 if ( 'bottom' == $which ) {787 if ( 'bottom' === $which ) { 786 788 $html_current_page = $current; 787 789 $total_pages_before = '<span class="screen-reader-text">' . __( 'Current Page' ) . '</span><span id="table-paging" class="paging-input">'; … … 1026 1028 $current_orderby = ''; 1027 1029 1028 if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] )1030 if ( isset( $_GET['order'] ) && 'desc' === $_GET['order'] ) 1029 1031 $current_order = 'desc'; 1030 1032 else … … 1045 1047 } 1046 1048 1047 if ( 'cb' == $column_key )1049 if ( 'cb' === $column_key ) 1048 1050 $class[] = 'check-column'; 1049 1051 elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) ) … … 1057 1059 list( $orderby, $desc_first ) = $sortable[$column_key]; 1058 1060 1059 if ( $current_orderby == $orderby ) {1060 $order = 'asc' == $current_order ? 'desc' : 'asc';1061 if ( $current_orderby === $orderby ) { 1062 $order = 'asc' === $current_order ? 'desc' : 'asc'; 1061 1063 $class[] = 'sorted'; 1062 1064 $class[] = $current_order; … … 1137 1139 */ 1138 1140 protected function display_tablenav( $which ) { 1139 if ( 'top' == $which )1141 if ( 'top' === $which ) { 1140 1142 wp_nonce_field( 'bulk-' . $this->_args['plural'] ); 1141 1143 } 1142 1144 if ( $this->has_items() ) : ?> 1143 1145 <div class="tablenav <?php echo esc_attr( $which ); ?>"> … … 1248 1250 $attributes = "class='$classes' $data"; 1249 1251 1250 if ( 'cb' == $column_name ) {1252 if ( 'cb' === $column_name ) { 1251 1253 echo '<th scope="row" class="check-column">'; 1252 1254 echo $this->column_cb( $item ); … … 1286 1288 */ 1287 1289 protected function handle_row_actions( $item, $column_name, $primary ) { 1288 return $column_name == $primary ? '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details' ) . '</span></button>' : '';1290 return $column_name === $primary ? '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details' ) . '</span></button>' : ''; 1289 1291 } 1290 1292
Note: See TracChangeset
for help on using the changeset viewer.