@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined('ABSPATH') ) { |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | 3 | die( 'You are not allowed to call this page directly.' ); |
| 4 | 4 | } |
| 5 | 5 | |
@@ -197,8 +197,8 @@ discard block |
||
| 197 | 197 | return $this->get_pagenum(); |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - if ( isset( $this->_pagination_args[ $key ] ) ) { |
|
| 201 | - return $this->_pagination_args[ $key ]; |
|
| 200 | + if ( isset( $this->_pagination_args[$key] ) ) { |
|
| 201 | + return $this->_pagination_args[$key]; |
|
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | |
@@ -253,8 +253,8 @@ discard block |
||
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | private function hidden_search_inputs( $param_name ) { |
| 256 | - if ( ! empty( $_REQUEST[ $param_name ] ) ) { |
|
| 257 | - echo '<input type="hidden" name="' . esc_attr( $param_name ) . '" value="' . esc_attr( $_REQUEST[ $param_name ] ) . '" />'; |
|
| 256 | + if ( ! empty( $_REQUEST[$param_name] ) ) { |
|
| 257 | + echo '<input type="hidden" name="' . esc_attr( $param_name ) . '" value="' . esc_attr( $_REQUEST[$param_name] ) . '" />'; |
|
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | 260 | |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | |
| 298 | 298 | echo "<ul class='subsubsub'>\n"; |
| 299 | 299 | foreach ( $views as $class => $view ) { |
| 300 | - $views[ $class ] = "\t<li class='$class'>$view"; |
|
| 300 | + $views[$class] = "\t<li class='$class'>$view"; |
|
| 301 | 301 | } |
| 302 | 302 | echo implode( " |</li>\n", $views ) . "</li>\n"; |
| 303 | 303 | echo '</ul>'; |
@@ -392,8 +392,8 @@ discard block |
||
| 392 | 392 | |
| 393 | 393 | private static function get_bulk_action( $action_name ) { |
| 394 | 394 | $action = false; |
| 395 | - if ( isset( $_REQUEST[ $action_name ] ) && -1 != sanitize_text_field( $_REQUEST[ $action_name ] ) ) { |
|
| 396 | - $action = sanitize_text_field( $_REQUEST[ $action_name ] ); |
|
| 395 | + if ( isset( $_REQUEST[$action_name] ) && -1 != sanitize_text_field( $_REQUEST[$action_name] ) ) { |
|
| 396 | + $action = sanitize_text_field( $_REQUEST[$action_name] ); |
|
| 397 | 397 | } |
| 398 | 398 | return $action; |
| 399 | 399 | } |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | |
| 419 | 419 | $out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">'; |
| 420 | 420 | foreach ( $actions as $action => $link ) { |
| 421 | - ++$i; |
|
| 421 | + ++ $i; |
|
| 422 | 422 | ( $i == $action_count ) ? $sep = '' : $sep = ' | '; |
| 423 | 423 | $out .= "<span class='$action'>$link$sep</span>"; |
| 424 | 424 | } |
@@ -689,7 +689,7 @@ discard block |
||
| 689 | 689 | |
| 690 | 690 | // If the primary column doesn't exist fall back to the |
| 691 | 691 | // first non-checkbox column. |
| 692 | - if ( ! isset( $columns[ $default ] ) ) { |
|
| 692 | + if ( ! isset( $columns[$default] ) ) { |
|
| 693 | 693 | $default = FrmListHelper::get_default_primary_column_name(); |
| 694 | 694 | } |
| 695 | 695 | |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | */ |
| 704 | 704 | $column = apply_filters( 'list_table_primary_column', $default, $this->screen->id ); |
| 705 | 705 | |
| 706 | - if ( empty( $column ) || ! isset( $columns[ $column ] ) ) { |
|
| 706 | + if ( empty( $column ) || ! isset( $columns[$column] ) ) { |
|
| 707 | 707 | $column = $default; |
| 708 | 708 | } |
| 709 | 709 | |
@@ -725,7 +725,7 @@ discard block |
||
| 725 | 725 | // In 4.3, we added a fourth argument for primary column. |
| 726 | 726 | $column_headers = array( array(), array(), array(), $this->get_primary_column_name() ); |
| 727 | 727 | foreach ( $this->_column_headers as $key => $value ) { |
| 728 | - $column_headers[ $key ] = $value; |
|
| 728 | + $column_headers[$key] = $value; |
|
| 729 | 729 | } |
| 730 | 730 | |
| 731 | 731 | return $column_headers; |
@@ -759,7 +759,7 @@ discard block |
||
| 759 | 759 | $data[1] = false; |
| 760 | 760 | } |
| 761 | 761 | |
| 762 | - $sortable[ $id ] = $data; |
|
| 762 | + $sortable[$id] = $data; |
|
| 763 | 763 | } |
| 764 | 764 | |
| 765 | 765 | $primary = $this->get_primary_column_name(); |
@@ -782,7 +782,7 @@ discard block |
||
| 782 | 782 | foreach ( $columns as $name => $c ) { |
| 783 | 783 | if ( ! in_array( $name, $hidden ) ) { |
| 784 | 784 | $hidden[] = $name; |
| 785 | - $remove--; |
|
| 785 | + $remove --; |
|
| 786 | 786 | if ( $remove <= 0 ) { |
| 787 | 787 | break; |
| 788 | 788 | } |
@@ -837,7 +837,7 @@ discard block |
||
| 837 | 837 | static $cb_counter = 1; |
| 838 | 838 | $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All' ) . '</label>' |
| 839 | 839 | . '<input id="cb-select-all-' . esc_attr( $cb_counter ) . '" type="checkbox" />'; |
| 840 | - $cb_counter++; |
|
| 840 | + $cb_counter ++; |
|
| 841 | 841 | } |
| 842 | 842 | |
| 843 | 843 | foreach ( $columns as $column_key => $column_display_name ) { |
@@ -857,8 +857,8 @@ discard block |
||
| 857 | 857 | $class[] = 'column-primary'; |
| 858 | 858 | } |
| 859 | 859 | |
| 860 | - if ( isset( $sortable[ $column_key ] ) ) { |
|
| 861 | - list( $orderby, $desc_first ) = $sortable[ $column_key ]; |
|
| 860 | + if ( isset( $sortable[$column_key] ) ) { |
|
| 861 | + list( $orderby, $desc_first ) = $sortable[$column_key]; |
|
| 862 | 862 | |
| 863 | 863 | if ( $current_orderby == $orderby ) { |
| 864 | 864 | $order = 'asc' == $current_order ? 'desc' : 'asc'; |