@@ -123,12 +123,12 @@ discard block |
||
123 | 123 | * @uses {@var $counter} |
124 | 124 | * @param Template_Context $context |
125 | 125 | */ |
126 | - add_action( 'gravityview/template/view/render', $add_anchor_id_filter = function ( $context ) use ( &$counter ) { |
|
126 | + add_action( 'gravityview/template/view/render', $add_anchor_id_filter = function( $context ) use ( &$counter ) { |
|
127 | 127 | /** @see \GV\View::set_anchor_id() */ |
128 | 128 | $context->view->set_anchor_id( $counter[ $context->view->ID ] ); |
129 | 129 | } ); |
130 | 130 | |
131 | - $add_search_action_filter = function ( $action ) use ( $view ) { |
|
131 | + $add_search_action_filter = function( $action ) use ( $view ) { |
|
132 | 132 | return $action . '#' . $view->get_anchor_id(); |
133 | 133 | }; |
134 | 134 | |
@@ -155,11 +155,11 @@ discard block |
||
155 | 155 | * This allows us to fake it till we make it. |
156 | 156 | */ |
157 | 157 | $parameters = $view->settings->as_atts(); |
158 | - if ( ! empty( $parameters['sort_field'] ) && is_array( $parameters['sort_field'] ) ) { |
|
158 | + if ( ! empty( $parameters[ 'sort_field' ] ) && is_array( $parameters[ 'sort_field' ] ) ) { |
|
159 | 159 | $has_multisort = true; |
160 | - $parameters['sort_field'] = reset( $parameters['sort_field'] ); |
|
161 | - if ( ! empty( $parameters['sort_direction'] ) && is_array( $parameters['sort_direction'] ) ) { |
|
162 | - $parameters['sort_direction'] = reset( $parameters['sort_direction'] ); |
|
160 | + $parameters[ 'sort_field' ] = reset( $parameters[ 'sort_field' ] ); |
|
161 | + if ( ! empty( $parameters[ 'sort_direction' ] ) && is_array( $parameters[ 'sort_direction' ] ) ) { |
|
162 | + $parameters[ 'sort_direction' ] = reset( $parameters[ 'sort_direction' ] ); |
|
163 | 163 | } |
164 | 164 | } |
165 | 165 | |
@@ -174,8 +174,8 @@ discard block |
||
174 | 174 | 'entries' => $entries, |
175 | 175 | 'request' => $request, |
176 | 176 | ), empty( $parameters ) ? array() : array( |
177 | - 'paging' => $parameters['paging'], |
|
178 | - 'sorting' => $parameters['sorting'], |
|
177 | + 'paging' => $parameters[ 'paging' ], |
|
178 | + 'sorting' => $parameters[ 'sorting' ], |
|
179 | 179 | ), empty( $post ) ? array() : array( |
180 | 180 | 'post' => $post, |
181 | 181 | ) ) ); |