@@ -28,18 +28,18 @@ |
||
| 28 | 28 | |
| 29 | 29 | $sort_fields_input = '<select name="template_settings[sort_field][]" class="gravityview_sort_field" id="gravityview_sort_field_%d">%s</select>'; |
| 30 | 30 | |
| 31 | - if ( is_array( $current_settings['sort_field'] ) ) { |
|
| 32 | - $primary_sort_fields = gravityview_get_sortable_fields( $curr_form, $current_settings['sort_field'][0] ); |
|
| 33 | - $secondary_sort_fields = gravityview_get_sortable_fields( $curr_form, $current_settings['sort_field'][1] ); |
|
| 31 | + if ( is_array( $current_settings[ 'sort_field' ] ) ) { |
|
| 32 | + $primary_sort_fields = gravityview_get_sortable_fields( $curr_form, $current_settings[ 'sort_field' ][ 0 ] ); |
|
| 33 | + $secondary_sort_fields = gravityview_get_sortable_fields( $curr_form, $current_settings[ 'sort_field' ][ 1 ] ); |
|
| 34 | 34 | } else { |
| 35 | - $primary_sort_fields = $secondary_sort_fields = gravityview_get_sortable_fields( $curr_form, $current_settings['sort_field'] ); |
|
| 35 | + $primary_sort_fields = $secondary_sort_fields = gravityview_get_sortable_fields( $curr_form, $current_settings[ 'sort_field' ] ); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // Splice the sort direction |
| 39 | 39 | $_directions = array(); |
| 40 | 40 | foreach ( (array)\GV\Utils::get( $current_settings, 'sort_direction', array() ) as $i => $direction ) { |
| 41 | 41 | if ( ! $i ) { |
| 42 | - $_directions['sort_direction'] = $direction; |
|
| 42 | + $_directions[ 'sort_direction' ] = $direction; |
|
| 43 | 43 | } else { |
| 44 | 44 | $_directions[ sprintf( 'sort_direction_%d', $i + 1 ) ] = $direction; |
| 45 | 45 | } |
@@ -141,8 +141,8 @@ discard block |
||
| 141 | 141 | * |
| 142 | 142 | * @see add_columns_sort_links |
| 143 | 143 | * @param string $url Single-sort URL |
| 144 | - * @param array $sort_args Single sorting for rules, in [ field_id, dir ] format |
|
| 145 | - * @param string|int $field_id ID of the current field being displayed |
|
| 144 | + * @param string[] $sort_args Single sorting for rules, in [ field_id, dir ] format |
|
| 145 | + * @param string $field_id ID of the current field being displayed |
|
| 146 | 146 | * |
| 147 | 147 | * @return string Multisort URL, if there are multiple sorts. Otherwise, existing $url |
| 148 | 148 | */ |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | * Output a field cell. |
| 347 | 347 | * |
| 348 | 348 | * @param \GV\Field $field The field to be ouput. |
| 349 | - * @param \GV\Field $entry The entry this field is for. |
|
| 349 | + * @param Entry $entry The entry this field is for. |
|
| 350 | 350 | * |
| 351 | 351 | * @return void |
| 352 | 352 | */ |
@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | - * Constructor. Add filters to modify output. |
|
| 23 | - * |
|
| 22 | + * Constructor. Add filters to modify output. |
|
| 23 | + * |
|
| 24 | 24 | * @since 2.0.4 |
| 25 | 25 | * |
| 26 | 26 | * @param View $view |
@@ -29,19 +29,19 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function __construct( View $view, Entry_Collection $entries, Request $request ) { |
| 31 | 31 | |
| 32 | - add_filter( 'gravityview/template/field/label', array( __CLASS__, 'add_columns_sort_links' ), 100, 2 ); |
|
| 32 | + add_filter( 'gravityview/template/field/label', array( __CLASS__, 'add_columns_sort_links' ), 100, 2 ); |
|
| 33 | 33 | |
| 34 | 34 | parent::__construct( $view, $entries, $request ); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | - * Add sorting links to HTML columns that support sorting |
|
| 39 | - * |
|
| 40 | - * @since 2.0.4 |
|
| 41 | - * @since 2.0.5 Made static |
|
| 42 | - * |
|
| 43 | - * @static |
|
| 44 | - * |
|
| 38 | + * Add sorting links to HTML columns that support sorting |
|
| 39 | + * |
|
| 40 | + * @since 2.0.4 |
|
| 41 | + * @since 2.0.5 Made static |
|
| 42 | + * |
|
| 43 | + * @static |
|
| 44 | + * |
|
| 45 | 45 | * @param string $column_label Label for the table column |
| 46 | 46 | * @param \GV\Template_Context $context |
| 47 | 47 | * |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $sort_columns = $context->view->settings->get( 'sort_columns' ); |
| 53 | 53 | |
| 54 | 54 | if ( empty( $sort_columns ) ) { |
| 55 | - return $column_label; |
|
| 55 | + return $column_label; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | if ( ! \GravityView_frontend::getInstance()->is_field_sortable( $context->field->ID, $context->view->form->form ) ) { |
@@ -102,22 +102,22 @@ discard block |
||
| 102 | 102 | // If we are already sorting by the current field... |
| 103 | 103 | if ( ! empty( $sorting['key'] ) && (string) $sort_field_id === (string) $sorting['key'] ) { |
| 104 | 104 | |
| 105 | - switch( $sorting['direction'] ) { |
|
| 106 | - // No sort |
|
| 107 | - case '': |
|
| 108 | - $sort_args[1] = 'asc'; |
|
| 109 | - $class .= ' gv-icon-caret-up-down'; |
|
| 110 | - break; |
|
| 111 | - case 'desc': |
|
| 112 | - $sort_args[1] = ''; |
|
| 113 | - $class .= ' gv-icon-sort-asc'; |
|
| 114 | - break; |
|
| 115 | - case 'asc': |
|
| 116 | - default: |
|
| 117 | - $sort_args[1] = 'desc'; |
|
| 118 | - $class .= ' gv-icon-sort-desc'; |
|
| 119 | - break; |
|
| 120 | - } |
|
| 105 | + switch( $sorting['direction'] ) { |
|
| 106 | + // No sort |
|
| 107 | + case '': |
|
| 108 | + $sort_args[1] = 'asc'; |
|
| 109 | + $class .= ' gv-icon-caret-up-down'; |
|
| 110 | + break; |
|
| 111 | + case 'desc': |
|
| 112 | + $sort_args[1] = ''; |
|
| 113 | + $class .= ' gv-icon-sort-asc'; |
|
| 114 | + break; |
|
| 115 | + case 'asc': |
|
| 116 | + default: |
|
| 117 | + $sort_args[1] = 'desc'; |
|
| 118 | + $class .= ' gv-icon-sort-desc'; |
|
| 119 | + break; |
|
| 120 | + } |
|
| 121 | 121 | |
| 122 | 122 | } else { |
| 123 | 123 | $class .= ' gv-icon-caret-up-down'; |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | $url = remove_query_arg( 'sort', $url ); |
| 128 | 128 | $multisort_url = self::_get_multisort_url( $url, $sort_args, $context->field->ID ); |
| 129 | 129 | |
| 130 | - $url = add_query_arg( $sort_args[0], $sort_args[1], $url ); |
|
| 130 | + $url = add_query_arg( $sort_args[0], $sort_args[1], $url ); |
|
| 131 | 131 | |
| 132 | 132 | $return = '<a href="'. esc_url_raw( $url ) .'"'; |
| 133 | 133 | |
@@ -141,50 +141,50 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
| 144 | - * Get the multi-sort URL used in the sorting links |
|
| 145 | - * |
|
| 146 | - * @todo Consider moving to Utils? |
|
| 147 | - * |
|
| 148 | - * @since 2.3 |
|
| 149 | - * |
|
| 150 | - * @see add_columns_sort_links |
|
| 144 | + * Get the multi-sort URL used in the sorting links |
|
| 145 | + * |
|
| 146 | + * @todo Consider moving to Utils? |
|
| 147 | + * |
|
| 148 | + * @since 2.3 |
|
| 149 | + * |
|
| 150 | + * @see add_columns_sort_links |
|
| 151 | 151 | * @param string $url Single-sort URL |
| 152 | 152 | * @param array $sort_args Single sorting for rules, in [ field_id, dir ] format |
| 153 | - * @param string|int $field_id ID of the current field being displayed |
|
| 154 | - * |
|
| 155 | - * @return string Multisort URL, if there are multiple sorts. Otherwise, existing $url |
|
| 153 | + * @param string|int $field_id ID of the current field being displayed |
|
| 154 | + * |
|
| 155 | + * @return string Multisort URL, if there are multiple sorts. Otherwise, existing $url |
|
| 156 | 156 | */ |
| 157 | 157 | static public function _get_multisort_url( $url, $sort_args, $field_id ) { |
| 158 | 158 | |
| 159 | 159 | $sorts = Utils::_GET( 'sort' ); |
| 160 | 160 | |
| 161 | 161 | if ( ! is_array( $sorts ) ) { |
| 162 | - return $url; |
|
| 162 | + return $url; |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - $multisort_url = $url; |
|
| 165 | + $multisort_url = $url; |
|
| 166 | 166 | |
| 167 | 167 | // If the field has already been sorted by, add the field to the URL |
| 168 | - if ( ! in_array( $field_id, $keys = array_keys( $sorts ) ) ) { |
|
| 169 | - if ( count( $keys ) ) { |
|
| 170 | - $multisort_url = add_query_arg( sprintf( 'sort[%s]', end( $keys ) ), $sorts[ end( $keys ) ], $multisort_url ); |
|
| 171 | - $multisort_url = add_query_arg( $sort_args[0], $sort_args[1], $multisort_url ); |
|
| 172 | - } else { |
|
| 173 | - $multisort_url = add_query_arg( $sort_args[0], $sort_args[1], $multisort_url ); |
|
| 174 | - } |
|
| 175 | - } |
|
| 176 | - // Otherwise, we are just updating the sort order |
|
| 177 | - else { |
|
| 178 | - |
|
| 179 | - // Pass empty value to unset |
|
| 180 | - if( '' === $sort_args[1] ) { |
|
| 181 | - unset( $sorts[ $field_id ] ); |
|
| 182 | - } else { |
|
| 183 | - $sorts[ $field_id ] = $sort_args[1]; |
|
| 184 | - } |
|
| 185 | - |
|
| 186 | - $multisort_url = add_query_arg( array( 'sort' => $sorts ), $multisort_url ); |
|
| 187 | - } |
|
| 168 | + if ( ! in_array( $field_id, $keys = array_keys( $sorts ) ) ) { |
|
| 169 | + if ( count( $keys ) ) { |
|
| 170 | + $multisort_url = add_query_arg( sprintf( 'sort[%s]', end( $keys ) ), $sorts[ end( $keys ) ], $multisort_url ); |
|
| 171 | + $multisort_url = add_query_arg( $sort_args[0], $sort_args[1], $multisort_url ); |
|
| 172 | + } else { |
|
| 173 | + $multisort_url = add_query_arg( $sort_args[0], $sort_args[1], $multisort_url ); |
|
| 174 | + } |
|
| 175 | + } |
|
| 176 | + // Otherwise, we are just updating the sort order |
|
| 177 | + else { |
|
| 178 | + |
|
| 179 | + // Pass empty value to unset |
|
| 180 | + if( '' === $sort_args[1] ) { |
|
| 181 | + unset( $sorts[ $field_id ] ); |
|
| 182 | + } else { |
|
| 183 | + $sorts[ $field_id ] = $sort_args[1]; |
|
| 184 | + } |
|
| 185 | + |
|
| 186 | + $multisort_url = add_query_arg( array( 'sort' => $sorts ), $multisort_url ); |
|
| 187 | + } |
|
| 188 | 188 | |
| 189 | 189 | return $multisort_url; |
| 190 | 190 | } |
@@ -214,10 +214,10 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | /** |
| 217 | - * Returns the label for a column, with support for all deprecated filters |
|
| 218 | - * |
|
| 219 | - * @since 2.1 |
|
| 220 | - * |
|
| 217 | + * Returns the label for a column, with support for all deprecated filters |
|
| 218 | + * |
|
| 219 | + * @since 2.1 |
|
| 220 | + * |
|
| 221 | 221 | * @param \GV\Field $field |
| 222 | 222 | * @param \GV\Template_Context $context |
| 223 | 223 | */ |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | $column_label = apply_filters( 'gravityview/template/field/label', $column_label, $context ); |
| 241 | 241 | |
| 242 | 242 | return $column_label; |
| 243 | - } |
|
| 243 | + } |
|
| 244 | 244 | |
| 245 | 245 | /** |
| 246 | 246 | * Output the entry row. |
@@ -309,15 +309,15 @@ discard block |
||
| 309 | 309 | */ |
| 310 | 310 | do_action( 'gravityview/template/table/cells/before', $context ); |
| 311 | 311 | |
| 312 | - /** |
|
| 313 | - * @action `gravityview_table_cells_before` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells. |
|
| 314 | - * @since 1.0.7 |
|
| 312 | + /** |
|
| 313 | + * @action `gravityview_table_cells_before` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells. |
|
| 314 | + * @since 1.0.7 |
|
| 315 | 315 | * @param \GravityView_View $this Current GravityView_View object |
| 316 | 316 | * @deprecated Use `gravityview/template/table/cells/before` |
| 317 | - */ |
|
| 318 | - do_action( 'gravityview_table_cells_before', \GravityView_View::getInstance() ); |
|
| 317 | + */ |
|
| 318 | + do_action( 'gravityview_table_cells_before', \GravityView_View::getInstance() ); |
|
| 319 | 319 | |
| 320 | - foreach ( $fields->all() as $field ) { |
|
| 320 | + foreach ( $fields->all() as $field ) { |
|
| 321 | 321 | if ( isset( $this->view->unions[ $entry['form_id'] ] ) ) { |
| 322 | 322 | if ( isset( $this->view->unions[ $entry['form_id'] ][ $field->ID ] ) ) { |
| 323 | 323 | $field = $this->view->unions[ $entry['form_id'] ][ $field->ID ]; |
@@ -337,13 +337,13 @@ discard block |
||
| 337 | 337 | */ |
| 338 | 338 | do_action( 'gravityview/template/table/cells/after', $context ); |
| 339 | 339 | |
| 340 | - /** |
|
| 341 | - * @action `gravityview_table_cells_after` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells. |
|
| 342 | - * @since 1.0.7 |
|
| 340 | + /** |
|
| 341 | + * @action `gravityview_table_cells_after` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells. |
|
| 342 | + * @since 1.0.7 |
|
| 343 | 343 | * @param \GravityView_View $this Current GravityView_View object |
| 344 | 344 | * @deprecated Use `gravityview/template/table/cells/after` |
| 345 | - */ |
|
| 346 | - do_action( 'gravityview_table_cells_after', \GravityView_View::getInstance() ); |
|
| 345 | + */ |
|
| 346 | + do_action( 'gravityview_table_cells_after', \GravityView_View::getInstance() ); |
|
| 347 | 347 | |
| 348 | 348 | ?> |
| 349 | 349 | </tr> |
@@ -384,9 +384,9 @@ discard block |
||
| 384 | 384 | 'value' => $value, |
| 385 | 385 | 'hide_empty' => false, |
| 386 | 386 | 'zone_id' => 'directory_table-columns', |
| 387 | - 'label' => self::get_field_column_label( $field, $context ), |
|
| 387 | + 'label' => self::get_field_column_label( $field, $context ), |
|
| 388 | 388 | 'markup' => '<td id="{{ field_id }}" class="{{ class }}" data-label="{{label_value:data-label}}">{{ value }}</td>', |
| 389 | - 'form' => $form, |
|
| 389 | + 'form' => $form, |
|
| 390 | 390 | ); |
| 391 | 391 | |
| 392 | 392 | /** Output. */ |
@@ -411,11 +411,11 @@ discard block |
||
| 411 | 411 | do_action( 'gravityview/template/table/body/before', $context ); |
| 412 | 412 | |
| 413 | 413 | /** |
| 414 | - * @action `gravityview_table_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows. |
|
| 415 | - * @deprecated Use `gravityview/template/table/body/before` |
|
| 416 | - * @since 1.0.7 |
|
| 417 | - * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 418 | - */ |
|
| 414 | + * @action `gravityview_table_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows. |
|
| 415 | + * @deprecated Use `gravityview/template/table/body/before` |
|
| 416 | + * @since 1.0.7 |
|
| 417 | + * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 418 | + */ |
|
| 419 | 419 | do_action( 'gravityview_table_body_before', \GravityView_View::getInstance() /** ugh! */ ); |
| 420 | 420 | } |
| 421 | 421 | |
@@ -437,11 +437,11 @@ discard block |
||
| 437 | 437 | do_action( 'gravityview/template/table/body/after', $context ); |
| 438 | 438 | |
| 439 | 439 | /** |
| 440 | - * @action `gravityview_table_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows. |
|
| 441 | - * @deprecated Use `gravityview/template/table/body/after` |
|
| 442 | - * @since 1.0.7 |
|
| 443 | - * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 444 | - */ |
|
| 440 | + * @action `gravityview_table_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows. |
|
| 441 | + * @deprecated Use `gravityview/template/table/body/after` |
|
| 442 | + * @since 1.0.7 |
|
| 443 | + * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 444 | + */ |
|
| 445 | 445 | do_action( 'gravityview_table_body_after', \GravityView_View::getInstance() /** ugh! */ ); |
| 446 | 446 | } |
| 447 | 447 | |
@@ -69,22 +69,22 @@ discard block |
||
| 69 | 69 | if ( is_array( $sorts ) ) { |
| 70 | 70 | foreach ( (array)$sorts as $key => $direction ) { |
| 71 | 71 | if ( $key == $context->field->ID ) { |
| 72 | - $sorting['key'] = $context->field->ID; |
|
| 73 | - $sorting['direction'] = strtolower( $direction ); |
|
| 72 | + $sorting[ 'key' ] = $context->field->ID; |
|
| 73 | + $sorting[ 'direction' ] = strtolower( $direction ); |
|
| 74 | 74 | break; |
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | } else { |
| 78 | 78 | if ( $sorts == $context->field->ID ) { |
| 79 | - $sorting['key'] = $context->field->ID; |
|
| 80 | - $sorting['direction'] = strtolower( Utils::_GET( 'dir', '' ) ); |
|
| 79 | + $sorting[ 'key' ] = $context->field->ID; |
|
| 80 | + $sorting[ 'direction' ] = strtolower( Utils::_GET( 'dir', '' ) ); |
|
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | } else { |
| 84 | 84 | foreach ( (array)$context->view->settings->get( 'sort_field', array() ) as $i => $sort_field ) { |
| 85 | 85 | if ( $sort_field == $context->field->ID ) { |
| 86 | - $sorting['key'] = $sort_field; |
|
| 87 | - $sorting['direction'] = strtolower( Utils::get( $directions, $i, '' ) ); |
|
| 86 | + $sorting[ 'key' ] = $sort_field; |
|
| 87 | + $sorting[ 'direction' ] = strtolower( Utils::get( $directions, $i, '' ) ); |
|
| 88 | 88 | break; // Only get the first sort |
| 89 | 89 | } |
| 90 | 90 | } |
@@ -100,21 +100,21 @@ discard block |
||
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | 102 | // If we are already sorting by the current field... |
| 103 | - if ( ! empty( $sorting['key'] ) && (string) $sort_field_id === (string) $sorting['key'] ) { |
|
| 103 | + if ( ! empty( $sorting[ 'key' ] ) && (string)$sort_field_id === (string)$sorting[ 'key' ] ) { |
|
| 104 | 104 | |
| 105 | - switch( $sorting['direction'] ) { |
|
| 105 | + switch ( $sorting[ 'direction' ] ) { |
|
| 106 | 106 | // No sort |
| 107 | 107 | case '': |
| 108 | - $sort_args[1] = 'asc'; |
|
| 108 | + $sort_args[ 1 ] = 'asc'; |
|
| 109 | 109 | $class .= ' gv-icon-caret-up-down'; |
| 110 | 110 | break; |
| 111 | 111 | case 'desc': |
| 112 | - $sort_args[1] = ''; |
|
| 112 | + $sort_args[ 1 ] = ''; |
|
| 113 | 113 | $class .= ' gv-icon-sort-asc'; |
| 114 | 114 | break; |
| 115 | 115 | case 'asc': |
| 116 | 116 | default: |
| 117 | - $sort_args[1] = 'desc'; |
|
| 117 | + $sort_args[ 1 ] = 'desc'; |
|
| 118 | 118 | $class .= ' gv-icon-sort-desc'; |
| 119 | 119 | break; |
| 120 | 120 | } |
@@ -127,15 +127,15 @@ discard block |
||
| 127 | 127 | $url = remove_query_arg( 'sort', $url ); |
| 128 | 128 | $multisort_url = self::_get_multisort_url( $url, $sort_args, $context->field->ID ); |
| 129 | 129 | |
| 130 | - $url = add_query_arg( $sort_args[0], $sort_args[1], $url ); |
|
| 130 | + $url = add_query_arg( $sort_args[ 0 ], $sort_args[ 1 ], $url ); |
|
| 131 | 131 | |
| 132 | - $return = '<a href="'. esc_url_raw( $url ) .'"'; |
|
| 132 | + $return = '<a href="' . esc_url_raw( $url ) . '"'; |
|
| 133 | 133 | |
| 134 | 134 | if ( ! empty( $multisort_url ) ) { |
| 135 | - $return .= ' data-multisort-href="'. esc_url_raw( $multisort_url ) . '"'; |
|
| 135 | + $return .= ' data-multisort-href="' . esc_url_raw( $multisort_url ) . '"'; |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - $return .= ' class="'. $class .'" ></a> '. $column_label; |
|
| 138 | + $return .= ' class="' . $class . '" ></a> ' . $column_label; |
|
| 139 | 139 | |
| 140 | 140 | return $return; |
| 141 | 141 | } |
@@ -168,19 +168,19 @@ discard block |
||
| 168 | 168 | if ( ! in_array( $field_id, $keys = array_keys( $sorts ) ) ) { |
| 169 | 169 | if ( count( $keys ) ) { |
| 170 | 170 | $multisort_url = add_query_arg( sprintf( 'sort[%s]', end( $keys ) ), $sorts[ end( $keys ) ], $multisort_url ); |
| 171 | - $multisort_url = add_query_arg( $sort_args[0], $sort_args[1], $multisort_url ); |
|
| 171 | + $multisort_url = add_query_arg( $sort_args[ 0 ], $sort_args[ 1 ], $multisort_url ); |
|
| 172 | 172 | } else { |
| 173 | - $multisort_url = add_query_arg( $sort_args[0], $sort_args[1], $multisort_url ); |
|
| 173 | + $multisort_url = add_query_arg( $sort_args[ 0 ], $sort_args[ 1 ], $multisort_url ); |
|
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | // Otherwise, we are just updating the sort order |
| 177 | 177 | else { |
| 178 | 178 | |
| 179 | 179 | // Pass empty value to unset |
| 180 | - if( '' === $sort_args[1] ) { |
|
| 180 | + if ( '' === $sort_args[ 1 ] ) { |
|
| 181 | 181 | unset( $sorts[ $field_id ] ); |
| 182 | 182 | } else { |
| 183 | - $sorts[ $field_id ] = $sort_args[1]; |
|
| 183 | + $sorts[ $field_id ] = $sort_args[ 1 ]; |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | $multisort_url = add_query_arg( array( 'sort' => $sorts ), $multisort_url ); |
@@ -318,9 +318,9 @@ discard block |
||
| 318 | 318 | do_action( 'gravityview_table_cells_before', \GravityView_View::getInstance() ); |
| 319 | 319 | |
| 320 | 320 | foreach ( $fields->all() as $field ) { |
| 321 | - if ( isset( $this->view->unions[ $entry['form_id'] ] ) ) { |
|
| 322 | - if ( isset( $this->view->unions[ $entry['form_id'] ][ $field->ID ] ) ) { |
|
| 323 | - $field = $this->view->unions[ $entry['form_id'] ][ $field->ID ]; |
|
| 321 | + if ( isset( $this->view->unions[ $entry[ 'form_id' ] ] ) ) { |
|
| 322 | + if ( isset( $this->view->unions[ $entry[ 'form_id' ] ][ $field->ID ] ) ) { |
|
| 323 | + $field = $this->view->unions[ $entry[ 'form_id' ] ][ $field->ID ]; |
|
| 324 | 324 | } else { |
| 325 | 325 | if ( ! $field instanceof Internal_Field ) { |
| 326 | 326 | $field = Internal_Field::from_configuration( array( 'id' => 'custom' ) ); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public static function get_instance() { |
| 96 | 96 | |
| 97 | - if( empty( self::$instance ) ) { |
|
| 97 | + if ( empty( self::$instance ) ) { |
|
| 98 | 98 | self::$instance = new self; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -128,9 +128,9 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | $operators = array_merge( self::$SUPPORTED_ARRAY_OPERATORS, self::$SUPPORTED_NUMERIC_OPERATORS, self::$SUPPORTED_SCALAR_OPERATORS, self::$SUPPORTED_CUSTOM_OPERATORS ); |
| 130 | 130 | |
| 131 | - if( $with_values ) { |
|
| 131 | + if ( $with_values ) { |
|
| 132 | 132 | $operators_with_values = array(); |
| 133 | - foreach( $operators as $key ) { |
|
| 133 | + foreach ( $operators as $key ) { |
|
| 134 | 134 | $operators_with_values[ $key ] = ''; |
| 135 | 135 | } |
| 136 | 136 | return $operators_with_values; |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | $operators = $this->get_operators( false ); |
| 151 | 151 | |
| 152 | - if( !in_array( $operation, $operators ) ) { |
|
| 152 | + if ( ! in_array( $operation, $operators ) ) { |
|
| 153 | 153 | gravityview()->log->debug( ' Attempted to add invalid operation type. {operation}', array( 'operation' => $operation ) ); |
| 154 | 154 | return false; |
| 155 | 155 | } |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | return null; |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | - if( empty( $atts ) ) { |
|
| 204 | + if ( empty( $atts ) ) { |
|
| 205 | 205 | gravityview()->log->error( '$atts are empty.', array( 'data' => $atts ) ); |
| 206 | 206 | return null; |
| 207 | 207 | } |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | $setup = $this->setup_operation_and_comparison(); |
| 226 | 226 | |
| 227 | 227 | // We need an operation and comparison value |
| 228 | - if( ! $setup ) { |
|
| 228 | + if ( ! $setup ) { |
|
| 229 | 229 | gravityview()->log->error( 'No valid operators were passed.', array( 'data' => $this->atts ) ); |
| 230 | 230 | return null; |
| 231 | 231 | } |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | $logged_in_match = ! $this->logged_in ^ is_user_logged_in(); // XNOR |
| 278 | 278 | |
| 279 | 279 | // Only logged-in match |
| 280 | - if( 1 === sizeof( $this->passed_atts ) ) { |
|
| 280 | + if ( 1 === sizeof( $this->passed_atts ) ) { |
|
| 281 | 281 | $this->is_match = $logged_in_match; |
| 282 | 282 | } else { |
| 283 | 283 | $this->is_match = $logged_in_match && $comparison_match; |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | */ |
| 292 | 292 | private function get_output() { |
| 293 | 293 | |
| 294 | - if( $this->is_match ) { |
|
| 294 | + if ( $this->is_match ) { |
|
| 295 | 295 | $output = $this->content; |
| 296 | 296 | } else { |
| 297 | 297 | $output = $this->else_content; |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | * @param string $output HTML/text output |
| 310 | 310 | * @param GVLogic_Shortcode $this This class |
| 311 | 311 | */ |
| 312 | - $output = apply_filters('gravityview/gvlogic/output', $output, $this ); |
|
| 312 | + $output = apply_filters( 'gravityview/gvlogic/output', $output, $this ); |
|
| 313 | 313 | |
| 314 | 314 | gravityview()->log->debug( 'Output: ', array( 'data' => $output ) ); |
| 315 | 315 | |
@@ -329,14 +329,14 @@ discard block |
||
| 329 | 329 | list( $before_else, $after_else ) = array_pad( explode( '[else]', $passed_content ), 2, NULL ); |
| 330 | 330 | list( $before_else_if, $after_else_if ) = array_pad( explode( '[else', $passed_content ), 2, NULL ); |
| 331 | 331 | |
| 332 | - $else_attr = isset( $this->atts['else'] ) ? $this->atts['else'] : NULL; |
|
| 332 | + $else_attr = isset( $this->atts[ 'else' ] ) ? $this->atts[ 'else' ] : NULL; |
|
| 333 | 333 | $else_content = isset( $after_else ) ? $after_else : $else_attr; |
| 334 | 334 | |
| 335 | 335 | // The content is everything OTHER than the [else] |
| 336 | 336 | $this->content = $before_else_if; |
| 337 | 337 | |
| 338 | 338 | if ( ! $this->is_match ) { |
| 339 | - if( $elseif_content = $this->process_elseif( $before_else ) ) { |
|
| 339 | + if ( $elseif_content = $this->process_elseif( $before_else ) ) { |
|
| 340 | 340 | $this->else_content = $elseif_content; |
| 341 | 341 | } else { |
| 342 | 342 | $this->else_content = $else_content; |
@@ -364,16 +364,16 @@ discard block |
||
| 364 | 364 | foreach ( $else_if_matches as $key => $else_if_match ) { |
| 365 | 365 | |
| 366 | 366 | // If $else_if_match[5] exists and has content, check for more shortcodes |
| 367 | - preg_match_all( '/' . $regex . '/', $else_if_match[5] . '[/else]', $recursive_matches, PREG_SET_ORDER ); |
|
| 367 | + preg_match_all( '/' . $regex . '/', $else_if_match[ 5 ] . '[/else]', $recursive_matches, PREG_SET_ORDER ); |
|
| 368 | 368 | |
| 369 | 369 | // If the logic passes, this is the value that should be used for $this->else_content |
| 370 | - $else_if_value = $else_if_match[5]; |
|
| 371 | - $check_elseif_match = $else_if_match[0]; |
|
| 370 | + $else_if_value = $else_if_match[ 5 ]; |
|
| 371 | + $check_elseif_match = $else_if_match[ 0 ]; |
|
| 372 | 372 | |
| 373 | 373 | // Retrieve the value of the match that is currently being checked, without any other [else] tags |
| 374 | - if( ! empty( $recursive_matches[0][0] ) ) { |
|
| 375 | - $else_if_value = str_replace( $recursive_matches[0][0], '', $else_if_value ); |
|
| 376 | - $check_elseif_match = str_replace( $recursive_matches[0][0], '', $check_elseif_match ); |
|
| 374 | + if ( ! empty( $recursive_matches[ 0 ][ 0 ] ) ) { |
|
| 375 | + $else_if_value = str_replace( $recursive_matches[ 0 ][ 0 ], '', $else_if_value ); |
|
| 376 | + $check_elseif_match = str_replace( $recursive_matches[ 0 ][ 0 ], '', $check_elseif_match ); |
|
| 377 | 377 | } |
| 378 | 378 | |
| 379 | 379 | $check_elseif_match = str_replace( '[else', '[gvlogicelse', $check_elseif_match ); |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | // Process any remaining [else] tags |
| 393 | - return $this->process_elseif( $else_if_match[5] ); |
|
| 393 | + return $this->process_elseif( $else_if_match[ 5 ] ); |
|
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | return false; |
@@ -417,11 +417,11 @@ discard block |
||
| 417 | 417 | $this->atts = array_intersect_key( $this->passed_atts, $this->atts ); |
| 418 | 418 | |
| 419 | 419 | // Strip whitespace if it's not default false |
| 420 | - $this->if = ( isset( $this->atts['if'] ) && is_string( $this->atts['if'] ) ) ? trim( $this->atts['if'] ) : false; |
|
| 420 | + $this->if = ( isset( $this->atts[ 'if' ] ) && is_string( $this->atts[ 'if' ] ) ) ? trim( $this->atts[ 'if' ] ) : false; |
|
| 421 | 421 | |
| 422 | - if ( isset( $this->atts['logged_in'] ) ) { |
|
| 422 | + if ( isset( $this->atts[ 'logged_in' ] ) ) { |
|
| 423 | 423 | // Truthy |
| 424 | - if ( in_array( strtolower( $this->atts['logged_in'] ), array( '0', 'false', 'no' ) ) ) { |
|
| 424 | + if ( in_array( strtolower( $this->atts[ 'logged_in' ] ), array( '0', 'false', 'no' ) ) ) { |
|
| 425 | 425 | $this->logged_in = false; |
| 426 | 426 | } else { |
| 427 | 427 | $this->logged_in = true; |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | do_action( 'gravityview/gvlogic/parse_atts/after', $this ); |
| 438 | 438 | |
| 439 | 439 | // Make sure the "if" isn't processed in self::setup_operation_and_comparison() |
| 440 | - unset( $this->atts['if'] ); |
|
| 440 | + unset( $this->atts[ 'if' ] ); |
|
| 441 | 441 | } |
| 442 | 442 | } |
| 443 | 443 | |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | if ( 'address' === \GV\Utils::get( $search_field, 'type' ) ) { |
| 62 | 62 | |
| 63 | - $field_id = intval( floor( $search_field['key'] ) ); |
|
| 64 | - $input_id = gravityview_get_input_id_from_id( $search_field['key'] ); |
|
| 63 | + $field_id = intval( floor( $search_field[ 'key' ] ) ); |
|
| 64 | + $input_id = gravityview_get_input_id_from_id( $search_field[ 'key' ] ); |
|
| 65 | 65 | $form = GravityView_View::getInstance()->getForm(); |
| 66 | 66 | |
| 67 | 67 | /** @var GF_Field_Address $address_field */ |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $choices = array(); |
| 71 | 71 | |
| 72 | 72 | $method_name = 'get_choices_' . self::get_input_type_from_input_id( $input_id ); |
| 73 | - if( method_exists( $this, $method_name ) ) { |
|
| 73 | + if ( method_exists( $this, $method_name ) ) { |
|
| 74 | 74 | /** |
| 75 | 75 | * @uses GravityView_Field_Address::get_choices_country() |
| 76 | 76 | * @uses GravityView_Field_Address::get_choices_state() |
@@ -78,12 +78,12 @@ discard block |
||
| 78 | 78 | $choices = $this->{$method_name}( $address_field, $form ); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - if( ! empty( $choices ) ) { |
|
| 82 | - $search_field['choices'] = $choices; |
|
| 83 | - $search_field['type'] = \GV\Utils::get( $search_field, 'input'); |
|
| 81 | + if ( ! empty( $choices ) ) { |
|
| 82 | + $search_field[ 'choices' ] = $choices; |
|
| 83 | + $search_field[ 'type' ] = \GV\Utils::get( $search_field, 'input' ); |
|
| 84 | 84 | } else { |
| 85 | - $search_field['type'] = 'text'; |
|
| 86 | - $search_field['input'] = 'input_text'; |
|
| 85 | + $search_field[ 'type' ] = 'text'; |
|
| 86 | + $search_field[ 'input' ] = 'input_text'; |
|
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $country_choices = array(); |
| 110 | 110 | |
| 111 | 111 | foreach ( $countries as $key => $country ) { |
| 112 | - $country_choices[] = array( |
|
| 112 | + $country_choices[ ] = array( |
|
| 113 | 113 | 'value' => $country, |
| 114 | 114 | 'text' => $country, |
| 115 | 115 | ); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | private function get_choices_state( $address_field, $form ) { |
| 136 | 136 | |
| 137 | - $address_type = empty( $address_field->addressType ) ? $address_field->get_default_address_type( $form['id'] ) : $address_field->addressType; |
|
| 137 | + $address_type = empty( $address_field->addressType ) ? $address_field->get_default_address_type( $form[ 'id' ] ) : $address_field->addressType; |
|
| 138 | 138 | |
| 139 | 139 | $state_choices = array(); |
| 140 | 140 | |
@@ -146,8 +146,8 @@ discard block |
||
| 146 | 146 | $states = GFCommon::get_canadian_provinces(); |
| 147 | 147 | break; |
| 148 | 148 | default: |
| 149 | - $address_types = $address_field->get_address_types( $form['id'] ); |
|
| 150 | - $states = empty( $address_types[ $address_type ]['states'] ) ? array() : $address_types[ $address_type ]['states']; |
|
| 149 | + $address_types = $address_field->get_address_types( $form[ 'id' ] ); |
|
| 150 | + $states = empty( $address_types[ $address_type ][ 'states' ] ) ? array() : $address_types[ $address_type ][ 'states' ]; |
|
| 151 | 151 | break; |
| 152 | 152 | } |
| 153 | 153 | |
@@ -156,19 +156,19 @@ discard block |
||
| 156 | 156 | $state_subchoices = array(); |
| 157 | 157 | |
| 158 | 158 | foreach ( $state as $key => $substate ) { |
| 159 | - $state_subchoices[] = array( |
|
| 159 | + $state_subchoices[ ] = array( |
|
| 160 | 160 | 'value' => is_numeric( $key ) ? $substate : $key, |
| 161 | 161 | 'text' => $substate, |
| 162 | 162 | ); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - $state_choices[] = array( |
|
| 165 | + $state_choices[ ] = array( |
|
| 166 | 166 | 'text' => $key, |
| 167 | 167 | 'value' => $state_subchoices, |
| 168 | 168 | ); |
| 169 | 169 | |
| 170 | 170 | } else { |
| 171 | - $state_choices[] = array( |
|
| 171 | + $state_choices[ ] = array( |
|
| 172 | 172 | 'value' => is_numeric( $key ) ? $state : $key, |
| 173 | 173 | 'text' => $state, |
| 174 | 174 | ); |
@@ -192,13 +192,13 @@ discard block |
||
| 192 | 192 | // Use the same inputs as the "text" input type allows |
| 193 | 193 | $text_inputs = \GV\Utils::get( $input_types, 'text' ); |
| 194 | 194 | |
| 195 | - $input_types['street'] = $text_inputs; |
|
| 196 | - $input_types['street2'] = $text_inputs; |
|
| 197 | - $input_types['city'] = $text_inputs; |
|
| 195 | + $input_types[ 'street' ] = $text_inputs; |
|
| 196 | + $input_types[ 'street2' ] = $text_inputs; |
|
| 197 | + $input_types[ 'city' ] = $text_inputs; |
|
| 198 | 198 | |
| 199 | - $input_types['state'] = array( 'select', 'radio', 'link' ) + $text_inputs; |
|
| 200 | - $input_types['zip'] = array( 'input_text' ); |
|
| 201 | - $input_types['country'] = array( 'select', 'radio', 'link' ) + $text_inputs; |
|
| 199 | + $input_types[ 'state' ] = array( 'select', 'radio', 'link' ) + $text_inputs; |
|
| 200 | + $input_types[ 'zip' ] = array( 'input_text' ); |
|
| 201 | + $input_types[ 'country' ] = array( 'select', 'radio', 'link' ) + $text_inputs; |
|
| 202 | 202 | |
| 203 | 203 | return $input_types; |
| 204 | 204 | } |
@@ -219,10 +219,10 @@ discard block |
||
| 219 | 219 | // Is this search field for an input (eg: 4.2) or the whole address field (eg: 4)? |
| 220 | 220 | $input_id = gravityview_get_input_id_from_id( $field_id ); |
| 221 | 221 | |
| 222 | - if( 'address' === $field_type && $input_id ) { |
|
| 222 | + if ( 'address' === $field_type && $input_id ) { |
|
| 223 | 223 | |
| 224 | 224 | // If the input ID matches an expected address input, set to that. Otherwise, keep existing input type. |
| 225 | - if( $address_field_name = self::get_input_type_from_input_id( $input_id ) ) { |
|
| 225 | + if ( $address_field_name = self::get_input_type_from_input_id( $input_id ) ) { |
|
| 226 | 226 | $input_type = $address_field_name; |
| 227 | 227 | } |
| 228 | 228 | } |
@@ -271,20 +271,20 @@ discard block |
||
| 271 | 271 | function field_options( $field_options, $template_id = '', $field_id = '', $context = '', $input_type = '' ) { |
| 272 | 272 | |
| 273 | 273 | // If this is NOT the full address field, return default options. |
| 274 | - if( floor( $field_id ) !== floatval( $field_id ) ) { |
|
| 274 | + if ( floor( $field_id ) !== floatval( $field_id ) ) { |
|
| 275 | 275 | return $field_options; |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | - if( 'edit' === $context ) { |
|
| 278 | + if ( 'edit' === $context ) { |
|
| 279 | 279 | return $field_options; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | $add_options = array(); |
| 283 | 283 | |
| 284 | - $add_options['show_map_link'] = array( |
|
| 284 | + $add_options[ 'show_map_link' ] = array( |
|
| 285 | 285 | 'type' => 'checkbox', |
| 286 | 286 | 'label' => __( 'Show Map Link:', 'gravityview' ), |
| 287 | - 'desc' => __('Display a "Map It" link below the address', 'gravityview'), |
|
| 287 | + 'desc' => __( 'Display a "Map It" link below the address', 'gravityview' ), |
|
| 288 | 288 | 'value' => true, |
| 289 | 289 | 'merge_tags' => false, |
| 290 | 290 | ); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | $this->label = esc_attr__( 'Approve Entries', 'gravityview' ); |
| 26 | 26 | |
| 27 | - $this->description = esc_attr__( 'Approve and reject entries from the View.', 'gravityview' ); |
|
| 27 | + $this->description = esc_attr__( 'Approve and reject entries from the View.', 'gravityview' ); |
|
| 28 | 28 | |
| 29 | 29 | $this->add_hooks(); |
| 30 | 30 | |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | function field_options( $field_options, $template_id = '', $field_id = '', $context = '', $input_type = '' ) { |
| 48 | 48 | |
| 49 | - unset( $field_options['only_loggedin'] ); |
|
| 49 | + unset( $field_options[ 'only_loggedin' ] ); |
|
| 50 | 50 | |
| 51 | - unset( $field_options['new_window'] ); |
|
| 51 | + unset( $field_options[ 'new_window' ] ); |
|
| 52 | 52 | |
| 53 | - unset( $field_options['show_as_link'] ); |
|
| 53 | + unset( $field_options[ 'show_as_link' ] ); |
|
| 54 | 54 | |
| 55 | 55 | return $field_options; |
| 56 | 56 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | add_action( 'gravityview/field/approval/load_scripts', array( $this, 'enqueue_and_localize_script' ) ); |
| 72 | 72 | |
| 73 | - add_action( 'gravityview_datatables_scripts_styles', array( $this, 'enqueue_and_localize_script' ) ); |
|
| 73 | + add_action( 'gravityview_datatables_scripts_styles', array( $this, 'enqueue_and_localize_script' ) ); |
|
| 74 | 74 | |
| 75 | 75 | add_filter( 'gravityview_get_entries', array( $this, 'modify_search_parameters' ), 1000 ); |
| 76 | 76 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | public function maybe_prevent_field_render( $html, $args ) { |
| 93 | 93 | |
| 94 | 94 | // If the field is `entry_approval` type but the user doesn't have the moderate entries cap, don't render. |
| 95 | - if( $this->name === \GV\Utils::get( $args['field'], 'id' ) && ! GVCommon::has_cap('gravityview_moderate_entries') ) { |
|
| 95 | + if ( $this->name === \GV\Utils::get( $args[ 'field' ], 'id' ) && ! GVCommon::has_cap( 'gravityview_moderate_entries' ) ) { |
|
| 96 | 96 | return ''; |
| 97 | 97 | } |
| 98 | 98 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | public function modify_search_parameters( $parameters ) { |
| 123 | 123 | |
| 124 | 124 | if ( $this->name === \GV\Utils::get( $parameters, 'sorting/key' ) ) { |
| 125 | - $parameters['sorting']['key'] = 'is_approved'; |
|
| 125 | + $parameters[ 'sorting' ][ 'key' ] = 'is_approved'; |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | return $parameters; |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | function register_scripts_and_styles() { |
| 139 | 139 | $script_debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; |
| 140 | 140 | |
| 141 | - wp_register_script( 'gravityview-field-approval', GRAVITYVIEW_URL . 'assets/js/field-approval'.$script_debug.'.js', array( 'jquery' ), GravityView_Plugin::version, true ); |
|
| 141 | + wp_register_script( 'gravityview-field-approval', GRAVITYVIEW_URL . 'assets/js/field-approval' . $script_debug . '.js', array( 'jquery' ), GravityView_Plugin::version, true ); |
|
| 142 | 142 | |
| 143 | 143 | wp_register_script( 'gravityview-field-approval-popper', GRAVITYVIEW_URL . 'assets/lib/tippy/popper.min.js', array(), GravityView_Plugin::version, true ); |
| 144 | 144 | wp_register_script( 'gravityview-field-approval-tippy', GRAVITYVIEW_URL . 'assets/lib/tippy/tippy.min.js', array(), GravityView_Plugin::version, true ); |
@@ -146,14 +146,14 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | $style_path = GRAVITYVIEW_DIR . 'templates/css/field-approval.css'; |
| 148 | 148 | |
| 149 | - if( class_exists( 'GravityView_View' ) ) { |
|
| 149 | + if ( class_exists( 'GravityView_View' ) ) { |
|
| 150 | 150 | /** |
| 151 | 151 | * Override CSS file by placing in your theme's /gravityview/css/ sub-directory. |
| 152 | 152 | */ |
| 153 | 153 | $style_path = GravityView_View::getInstance()->locate_template( 'css/field-approval.css', false ); |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | - $style_url = plugins_url( 'css/field-approval.css', trailingslashit( dirname( $style_path ) ) ); |
|
| 156 | + $style_url = plugins_url( 'css/field-approval.css', trailingslashit( dirname( $style_path ) ) ); |
|
| 157 | 157 | |
| 158 | 158 | /** |
| 159 | 159 | * @filter `gravityview/field/approval/css_url` URL to the Approval field CSS file. |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | $style_url = apply_filters( 'gravityview/field/approval/css_url', $style_url ); |
| 164 | 164 | |
| 165 | - if( ! empty( $style_url ) ) { |
|
| 165 | + if ( ! empty( $style_url ) ) { |
|
| 166 | 166 | wp_register_style( 'gravityview-field-approval', $style_url, array( 'dashicons' ), GravityView_Plugin::version, 'screen' ); |
| 167 | 167 | } |
| 168 | 168 | |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | public function enqueue_and_localize_script() { |
| 178 | 178 | |
| 179 | 179 | // The script is already registered and enqueued |
| 180 | - if( wp_script_is( 'gravityview-field-approval', 'enqueued' ) ) { |
|
| 180 | + if ( wp_script_is( 'gravityview-field-approval', 'enqueued' ) ) { |
|
| 181 | 181 | return; |
| 182 | 182 | } |
| 183 | 183 | |
@@ -190,11 +190,11 @@ discard block |
||
| 190 | 190 | |
| 191 | 191 | wp_localize_script( 'gravityview-field-approval', 'gvApproval', array( |
| 192 | 192 | 'ajaxurl' => admin_url( 'admin-ajax.php' ), |
| 193 | - 'nonce' => wp_create_nonce('gravityview_entry_approval'), |
|
| 193 | + 'nonce' => wp_create_nonce( 'gravityview_entry_approval' ), |
|
| 194 | 194 | 'status' => GravityView_Entry_Approval_Status::get_all(), |
| 195 | 195 | 'status_popover_template' => GravityView_Entry_Approval::get_popover_template(), |
| 196 | 196 | 'status_popover_placement' => GravityView_Entry_Approval::get_popover_placement(), |
| 197 | - )); |
|
| 197 | + ) ); |
|
| 198 | 198 | |
| 199 | 199 | } |
| 200 | 200 | |
@@ -211,8 +211,8 @@ discard block |
||
| 211 | 211 | */ |
| 212 | 212 | public function filter_gravityview_entry_default_field( $entry_default_fields, $form, $context ) { |
| 213 | 213 | |
| 214 | - if ( ! isset( $entry_default_fields["{$this->name}"] ) && 'edit' !== $context ) { |
|
| 215 | - $entry_default_fields["{$this->name}"] = array( |
|
| 214 | + if ( ! isset( $entry_default_fields[ "{$this->name}" ] ) && 'edit' !== $context ) { |
|
| 215 | + $entry_default_fields[ "{$this->name}" ] = array( |
|
| 216 | 216 | 'label' => $this->label, |
| 217 | 217 | 'desc' => $this->description, |
| 218 | 218 | 'type' => $this->name, |
@@ -134,28 +134,28 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function add_network_menu() { |
| 136 | 136 | |
| 137 | - if ( ! gravityview()->plugin->is_network_activated() ) { |
|
| 137 | + if ( ! gravityview()->plugin->is_network_activated() ) { |
|
| 138 | 138 | return; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - add_menu_page( __( 'Settings', 'gravityview' ), __( 'GravityView', 'gravityview' ), $this->_capabilities_app_settings, "{$this->_slug}_settings", array( $this, 'app_tab_page' ), 'none' ); |
|
| 141 | + add_menu_page( __( 'Settings', 'gravityview' ), __( 'GravityView', 'gravityview' ), $this->_capabilities_app_settings, "{$this->_slug}_settings", array( $this, 'app_tab_page' ), 'none' ); |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | /** |
| 145 | - * Uninstall all traces of GravityView |
|
| 146 | - * |
|
| 147 | - * Note: method is public because parent method is public |
|
| 148 | - * |
|
| 145 | + * Uninstall all traces of GravityView |
|
| 146 | + * |
|
| 147 | + * Note: method is public because parent method is public |
|
| 148 | + * |
|
| 149 | 149 | * @return bool |
| 150 | 150 | */ |
| 151 | 151 | public function uninstall() { |
| 152 | 152 | gravityview()->plugin->uninstall(); |
| 153 | 153 | |
| 154 | 154 | /** |
| 155 | - * Set the path so that Gravity Forms can de-activate GravityView |
|
| 156 | - * @see GFAddOn::uninstall_addon |
|
| 157 | - * @uses deactivate_plugins() |
|
| 158 | - */ |
|
| 155 | + * Set the path so that Gravity Forms can de-activate GravityView |
|
| 156 | + * @see GFAddOn::uninstall_addon |
|
| 157 | + * @uses deactivate_plugins() |
|
| 158 | + */ |
|
| 159 | 159 | $this->_path = GRAVITYVIEW_FILE; |
| 160 | 160 | |
| 161 | 161 | return true; |
@@ -185,42 +185,42 @@ discard block |
||
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |
| 188 | - * Get an array of reasons why the plugin might be uninstalled |
|
| 189 | - * |
|
| 190 | - * @since 1.17.5 |
|
| 191 | - * |
|
| 188 | + * Get an array of reasons why the plugin might be uninstalled |
|
| 189 | + * |
|
| 190 | + * @since 1.17.5 |
|
| 191 | + * |
|
| 192 | 192 | * @return array Array of reasons with the label and followup questions for each uninstall reason |
| 193 | 193 | */ |
| 194 | 194 | private function get_uninstall_reasons() { |
| 195 | 195 | $reasons = array( |
| 196 | 196 | 'will-continue' => array( |
| 197 | - 'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ), |
|
| 198 | - ), |
|
| 197 | + 'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ), |
|
| 198 | + ), |
|
| 199 | 199 | 'no-longer-need' => array( |
| 200 | - 'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ), |
|
| 201 | - ), |
|
| 200 | + 'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ), |
|
| 201 | + ), |
|
| 202 | 202 | 'doesnt-work' => array( |
| 203 | - 'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ), |
|
| 204 | - ), |
|
| 203 | + 'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ), |
|
| 204 | + ), |
|
| 205 | 205 | 'found-other' => array( |
| 206 | - 'label' => esc_html__( 'I found a better plugin', 'gravityview' ), |
|
| 207 | - 'followup' => esc_attr__( 'What plugin you are using, and why?', 'gravityview' ), |
|
| 208 | - ), |
|
| 206 | + 'label' => esc_html__( 'I found a better plugin', 'gravityview' ), |
|
| 207 | + 'followup' => esc_attr__( 'What plugin you are using, and why?', 'gravityview' ), |
|
| 208 | + ), |
|
| 209 | 209 | 'other' => array( |
| 210 | - 'label' => esc_html__( 'Other', 'gravityview' ), |
|
| 211 | - ), |
|
| 210 | + 'label' => esc_html__( 'Other', 'gravityview' ), |
|
| 211 | + ), |
|
| 212 | 212 | ); |
| 213 | 213 | |
| 214 | 214 | shuffle( $reasons ); |
| 215 | 215 | |
| 216 | 216 | return $reasons; |
| 217 | - } |
|
| 217 | + } |
|
| 218 | 218 | |
| 219 | 219 | /** |
| 220 | - * Display a feedback form when the plugin is uninstalled |
|
| 221 | - * |
|
| 222 | - * @since 1.17.5 |
|
| 223 | - * |
|
| 220 | + * Display a feedback form when the plugin is uninstalled |
|
| 221 | + * |
|
| 222 | + * @since 1.17.5 |
|
| 223 | + * |
|
| 224 | 224 | * @return string HTML of the uninstallation form |
| 225 | 225 | */ |
| 226 | 226 | public function uninstall_form() { |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | <h2><?php esc_html_e( 'Why did you uninstall GravityView?', 'gravityview' ); ?></h2> |
| 301 | 301 | <ul> |
| 302 | 302 | <?php |
| 303 | - $reasons = $this->get_uninstall_reasons(); |
|
| 303 | + $reasons = $this->get_uninstall_reasons(); |
|
| 304 | 304 | foreach ( $reasons as $reason ) { |
| 305 | 305 | printf( '<li><label><input name="reason" type="radio" value="other" data-followup="%s"> %s</label></li>', Utils::get( $reason, 'followup' ), Utils::get( $reason, 'label' ) ); |
| 306 | 306 | } |
@@ -394,12 +394,12 @@ discard block |
||
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | public function app_settings_tab() { |
| 397 | - parent::app_settings_tab(); |
|
| 397 | + parent::app_settings_tab(); |
|
| 398 | 398 | |
| 399 | 399 | if ( $this->maybe_uninstall() ) { |
| 400 | - echo $this->uninstall_form(); |
|
| 400 | + echo $this->uninstall_form(); |
|
| 401 | 401 | } |
| 402 | - } |
|
| 402 | + } |
|
| 403 | 403 | |
| 404 | 404 | /** |
| 405 | 405 | * The Settings title |
@@ -489,9 +489,9 @@ discard block |
||
| 489 | 489 | |
| 490 | 490 | if( is_multisite() ) { |
| 491 | 491 | $option_value = get_blog_option( get_main_site_id(), $option_name, array() ); |
| 492 | - } else { |
|
| 493 | - $option_value = get_site_option( $option_name, array() ); |
|
| 494 | - } |
|
| 492 | + } else { |
|
| 493 | + $option_value = get_site_option( $option_name, array() ); |
|
| 494 | + } |
|
| 495 | 495 | |
| 496 | 496 | return wp_parse_args( $option_value, $this->defaults() ); |
| 497 | 497 | } |
@@ -562,8 +562,8 @@ discard block |
||
| 562 | 562 | type="' . $field['type'] . '" |
| 563 | 563 | name="' . esc_attr( $name ) . '" |
| 564 | 564 | value="' . $value . '" ' . |
| 565 | - implode( ' ', $attributes ) . |
|
| 566 | - ' />'; |
|
| 565 | + implode( ' ', $attributes ) . |
|
| 566 | + ' />'; |
|
| 567 | 567 | |
| 568 | 568 | if ( $echo ) { |
| 569 | 569 | echo $html; |
@@ -581,12 +581,12 @@ discard block |
||
| 581 | 581 | } |
| 582 | 582 | |
| 583 | 583 | /** |
| 584 | - * Check whether GravityView is being saved |
|
| 585 | - * |
|
| 586 | - * The generic is_save_postback() is true for all addons |
|
| 587 | - * |
|
| 588 | - * @since 2.0.8 |
|
| 589 | - * |
|
| 584 | + * Check whether GravityView is being saved |
|
| 585 | + * |
|
| 586 | + * The generic is_save_postback() is true for all addons |
|
| 587 | + * |
|
| 588 | + * @since 2.0.8 |
|
| 589 | + * |
|
| 590 | 590 | * @return bool |
| 591 | 591 | */ |
| 592 | 592 | public function is_save_postback() { |
@@ -600,16 +600,16 @@ discard block |
||
| 600 | 600 | */ |
| 601 | 601 | public function license_key_notice() { |
| 602 | 602 | |
| 603 | - if( $this->is_save_postback() ) { |
|
| 604 | - $settings = $this->get_posted_settings(); |
|
| 605 | - $license_key = \GV\Utils::get( $settings, 'license_key' ); |
|
| 606 | - $license_status = \GV\Utils::get( $settings, 'license_key_status', 'inactive' ); |
|
| 607 | - } else { |
|
| 608 | - $license_status = $this->get( 'license_key_status', 'inactive' ); |
|
| 609 | - $license_key = $this->get( 'license_key' ); |
|
| 610 | - } |
|
| 603 | + if( $this->is_save_postback() ) { |
|
| 604 | + $settings = $this->get_posted_settings(); |
|
| 605 | + $license_key = \GV\Utils::get( $settings, 'license_key' ); |
|
| 606 | + $license_status = \GV\Utils::get( $settings, 'license_key_status', 'inactive' ); |
|
| 607 | + } else { |
|
| 608 | + $license_status = $this->get( 'license_key_status', 'inactive' ); |
|
| 609 | + $license_key = $this->get( 'license_key' ); |
|
| 610 | + } |
|
| 611 | 611 | |
| 612 | - $license_id = empty( $license_key ) ? 'license' : $license_key; |
|
| 612 | + $license_id = empty( $license_key ) ? 'license' : $license_key; |
|
| 613 | 613 | |
| 614 | 614 | $message = esc_html__( 'Your GravityView license %s. This means you’re missing out on updates and support! %sActivate your license%s or %sget a license here%s.', 'gravityview' ); |
| 615 | 615 | |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | $update_below = false; |
| 627 | 627 | $primary_button_link = admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ); |
| 628 | 628 | |
| 629 | - switch ( $license_status ) { |
|
| 629 | + switch ( $license_status ) { |
|
| 630 | 630 | /** @since 1.17 */ |
| 631 | 631 | case 'expired': |
| 632 | 632 | $title = __( 'Expired License', 'gravityview' ); |
@@ -664,13 +664,13 @@ discard block |
||
| 664 | 664 | return; |
| 665 | 665 | } |
| 666 | 666 | |
| 667 | - \GravityView_Admin_Notices::add_notice( array( |
|
| 668 | - 'message' => $message, |
|
| 669 | - 'class' => 'notice notice-warning', |
|
| 670 | - 'title' => $title, |
|
| 671 | - 'cap' => 'gravityview_edit_settings', |
|
| 672 | - 'dismiss' => sha1( $license_status . '_' . $license_id . '_' . date( 'z' ) ), // Show every day, instead of every 8 weeks (which is the default) |
|
| 673 | - ) ); |
|
| 667 | + \GravityView_Admin_Notices::add_notice( array( |
|
| 668 | + 'message' => $message, |
|
| 669 | + 'class' => 'notice notice-warning', |
|
| 670 | + 'title' => $title, |
|
| 671 | + 'cap' => 'gravityview_edit_settings', |
|
| 672 | + 'dismiss' => sha1( $license_status . '_' . $license_id . '_' . date( 'z' ) ), // Show every day, instead of every 8 weeks (which is the default) |
|
| 673 | + ) ); |
|
| 674 | 674 | } |
| 675 | 675 | |
| 676 | 676 | /** |
@@ -684,12 +684,12 @@ discard block |
||
| 684 | 684 | } |
| 685 | 685 | |
| 686 | 686 | /** |
| 687 | - * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
| 688 | - * |
|
| 689 | - * @since 1.21.5 |
|
| 690 | - * |
|
| 691 | - * @see GFAddOn::scripts() |
|
| 692 | - * |
|
| 687 | + * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
| 688 | + * |
|
| 689 | + * @since 1.21.5 |
|
| 690 | + * |
|
| 691 | + * @see GFAddOn::scripts() |
|
| 692 | + * |
|
| 693 | 693 | * @return array Array of scripts |
| 694 | 694 | */ |
| 695 | 695 | public function scripts() { |
@@ -698,10 +698,10 @@ discard block |
||
| 698 | 698 | $scripts[] = array( |
| 699 | 699 | 'handle' => 'gform_tooltip_init', |
| 700 | 700 | 'enqueue' => array( |
| 701 | - array( |
|
| 702 | - 'admin_page' => array( 'app_settings' ) |
|
| 703 | - ) |
|
| 704 | - ) |
|
| 701 | + array( |
|
| 702 | + 'admin_page' => array( 'app_settings' ) |
|
| 703 | + ) |
|
| 704 | + ) |
|
| 705 | 705 | ); |
| 706 | 706 | |
| 707 | 707 | return $scripts; |
@@ -719,10 +719,10 @@ discard block |
||
| 719 | 719 | 'src' => plugins_url( 'assets/css/admin-settings.css', GRAVITYVIEW_FILE ), |
| 720 | 720 | 'version' => Plugin::$version, |
| 721 | 721 | 'deps' => array( |
| 722 | - 'gform_admin', |
|
| 722 | + 'gform_admin', |
|
| 723 | 723 | 'gaddon_form_settings_css', |
| 724 | - 'gform_tooltip', |
|
| 725 | - 'gform_font_awesome', |
|
| 724 | + 'gform_tooltip', |
|
| 725 | + 'gform_font_awesome', |
|
| 726 | 726 | ), |
| 727 | 727 | 'enqueue' => array( |
| 728 | 728 | array( 'admin_page' => array( |
@@ -890,7 +890,7 @@ discard block |
||
| 890 | 890 | array( |
| 891 | 891 | 'label' => _x( 'Show me beta versions if they are available.', 'gravityview' ), |
| 892 | 892 | 'value' => '1', |
| 893 | - 'name' => 'beta', |
|
| 893 | + 'name' => 'beta', |
|
| 894 | 894 | ), |
| 895 | 895 | ), |
| 896 | 896 | 'description' => __( 'You will have early access to the latest GravityView features and improvements. There may be bugs! If you encounter an issue, help make GravityView better by reporting it!', 'gravityview' ), |
@@ -928,38 +928,38 @@ discard block |
||
| 928 | 928 | |
| 929 | 929 | if ( empty( $field['disabled'] ) ) { |
| 930 | 930 | unset( $field['disabled'] ); |
| 931 | - } |
|
| 931 | + } |
|
| 932 | 932 | } |
| 933 | 933 | |
| 934 | - $sections = array( |
|
| 935 | - array( |
|
| 936 | - 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __( 'You are running GravityView version %s', 'gravityview' ), Plugin::$version ) ), |
|
| 937 | - 'fields' => $fields, |
|
| 938 | - ) |
|
| 939 | - ); |
|
| 934 | + $sections = array( |
|
| 935 | + array( |
|
| 936 | + 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __( 'You are running GravityView version %s', 'gravityview' ), Plugin::$version ) ), |
|
| 937 | + 'fields' => $fields, |
|
| 938 | + ) |
|
| 939 | + ); |
|
| 940 | 940 | |
| 941 | - // custom 'update settings' button |
|
| 942 | - $button = array( |
|
| 943 | - 'class' => 'button button-primary button-hero', |
|
| 944 | - 'type' => 'save', |
|
| 945 | - ); |
|
| 941 | + // custom 'update settings' button |
|
| 942 | + $button = array( |
|
| 943 | + 'class' => 'button button-primary button-hero', |
|
| 944 | + 'type' => 'save', |
|
| 945 | + ); |
|
| 946 | 946 | |
| 947 | 947 | if ( $disabled_attribute ) { |
| 948 | 948 | $button['disabled'] = $disabled_attribute; |
| 949 | 949 | } |
| 950 | 950 | |
| 951 | - /** |
|
| 952 | - * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
| 953 | - * Extensions can tap in here to insert their own section and settings. |
|
| 954 | - * <code> |
|
| 955 | - * $sections[] = array( |
|
| 956 | - * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
| 957 | - * 'fields' => $settings, |
|
| 958 | - * ); |
|
| 959 | - * </code> |
|
| 960 | - * @param array $extension_settings Empty array, ready for extension settings! |
|
| 961 | - */ |
|
| 962 | - $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
| 951 | + /** |
|
| 952 | + * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
| 953 | + * Extensions can tap in here to insert their own section and settings. |
|
| 954 | + * <code> |
|
| 955 | + * $sections[] = array( |
|
| 956 | + * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
| 957 | + * 'fields' => $settings, |
|
| 958 | + * ); |
|
| 959 | + * </code> |
|
| 960 | + * @param array $extension_settings Empty array, ready for extension settings! |
|
| 961 | + */ |
|
| 962 | + $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
| 963 | 963 | |
| 964 | 964 | // If there are extensions, add a section for them |
| 965 | 965 | if ( ! empty( $extension_sections ) ) { |
@@ -972,13 +972,13 @@ discard block |
||
| 972 | 972 | } |
| 973 | 973 | } |
| 974 | 974 | |
| 975 | - $k = count( $extension_sections ) - 1 ; |
|
| 976 | - $extension_sections[ $k ]['fields'][] = $button; |
|
| 975 | + $k = count( $extension_sections ) - 1 ; |
|
| 976 | + $extension_sections[ $k ]['fields'][] = $button; |
|
| 977 | 977 | $sections = array_merge( $sections, $extension_sections ); |
| 978 | 978 | } else { |
| 979 | - // add the 'update settings' button to the general section |
|
| 980 | - $sections[0]['fields'][] = $button; |
|
| 981 | - } |
|
| 979 | + // add the 'update settings' button to the general section |
|
| 980 | + $sections[0]['fields'][] = $button; |
|
| 981 | + } |
|
| 982 | 982 | |
| 983 | 983 | return $sections; |
| 984 | 984 | } |
@@ -1032,9 +1032,9 @@ discard block |
||
| 1032 | 1032 | */ |
| 1033 | 1033 | protected function settings_edd_license( $field, $echo = true ) { |
| 1034 | 1034 | |
| 1035 | - if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
|
| 1036 | - $field['input_type'] = 'password'; |
|
| 1037 | - } |
|
| 1035 | + if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
|
| 1036 | + $field['input_type'] = 'password'; |
|
| 1037 | + } |
|
| 1038 | 1038 | |
| 1039 | 1039 | $text = $this->settings_text( $field, false ); |
| 1040 | 1040 | |
@@ -1051,9 +1051,9 @@ discard block |
||
| 1051 | 1051 | |
| 1052 | 1052 | /** |
| 1053 | 1053 | * Allow pure HTML settings row |
| 1054 | - * |
|
| 1055 | - * @since 2.0.6 |
|
| 1056 | - * |
|
| 1054 | + * |
|
| 1055 | + * @since 2.0.6 |
|
| 1056 | + * |
|
| 1057 | 1057 | * @param array $field |
| 1058 | 1058 | * @param bool $echo Whether to echo the |
| 1059 | 1059 | * |
@@ -1119,19 +1119,19 @@ discard block |
||
| 1119 | 1119 | } |
| 1120 | 1120 | |
| 1121 | 1121 | /** |
| 1122 | - * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it |
|
| 1123 | - * |
|
| 1124 | - * Converts `$field['description']` to `$field['gv_description']` |
|
| 1125 | - * Converts `$field['subtitle']` to `$field['description']` |
|
| 1126 | - * |
|
| 1127 | - * @see \GV\Addon_Settings::single_setting_label Converts `gv_description` back to `description` |
|
| 1128 | - * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description |
|
| 1129 | - * |
|
| 1130 | - * @since 1.21.5.2 |
|
| 1131 | - * |
|
| 1122 | + * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it |
|
| 1123 | + * |
|
| 1124 | + * Converts `$field['description']` to `$field['gv_description']` |
|
| 1125 | + * Converts `$field['subtitle']` to `$field['description']` |
|
| 1126 | + * |
|
| 1127 | + * @see \GV\Addon_Settings::single_setting_label Converts `gv_description` back to `description` |
|
| 1128 | + * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description |
|
| 1129 | + * |
|
| 1130 | + * @since 1.21.5.2 |
|
| 1131 | + * |
|
| 1132 | 1132 | * @param array $field |
| 1133 | - * |
|
| 1134 | - * @return void |
|
| 1133 | + * |
|
| 1134 | + * @return void |
|
| 1135 | 1135 | */ |
| 1136 | 1136 | public function single_setting_row( $field ) { |
| 1137 | 1137 | $field['gv_description'] = Utils::get( $field, 'description' ); |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * @return array |
| 103 | 103 | */ |
| 104 | 104 | public function modify_app_settings_menu_title( $setting_tabs ) { |
| 105 | - $setting_tabs[0]['label'] = __( 'GravityView Settings', 'gravityview' ); |
|
| 105 | + $setting_tabs[ 0 ][ 'label' ] = __( 'GravityView Settings', 'gravityview' ); |
|
| 106 | 106 | return $setting_tabs; |
| 107 | 107 | } |
| 108 | 108 | |
@@ -308,15 +308,15 @@ discard block |
||
| 308 | 308 | </ul> |
| 309 | 309 | <div class="gv-followup widefat"> |
| 310 | 310 | <p><strong><label for="gv-reason-details"><?php esc_html_e( 'Comments', 'gravityview' ); ?></label></strong></p> |
| 311 | - <textarea id="gv-reason-details" name="reason_details" data-default="<?php esc_attr_e('Please share your thoughts about GravityView', 'gravityview') ?>" placeholder="<?php esc_attr_e('Please share your thoughts about GravityView', 'gravityview'); ?>" class="large-text"></textarea> |
|
| 311 | + <textarea id="gv-reason-details" name="reason_details" data-default="<?php esc_attr_e( 'Please share your thoughts about GravityView', 'gravityview' ) ?>" placeholder="<?php esc_attr_e( 'Please share your thoughts about GravityView', 'gravityview' ); ?>" class="large-text"></textarea> |
|
| 312 | 312 | </div> |
| 313 | 313 | <div class="scale-description"> |
| 314 | 314 | <p><strong><?php esc_html_e( 'How likely are you to recommend GravityView?', 'gravityview' ); ?></strong></p> |
| 315 | 315 | <ul class="inline"> |
| 316 | 316 | <?php |
| 317 | 317 | $i = 0; |
| 318 | - while( $i < 11 ) { |
|
| 319 | - echo '<li class="inline number-scale"><label><input name="likely_to_refer" id="likely_to_refer_'.$i.'" value="'.$i.'" type="radio"> '.$i.'</label></li>'; |
|
| 318 | + while ( $i < 11 ) { |
|
| 319 | + echo '<li class="inline number-scale"><label><input name="likely_to_refer" id="likely_to_refer_' . $i . '" value="' . $i . '" type="radio"> ' . $i . '</label></li>'; |
|
| 320 | 320 | $i++; |
| 321 | 321 | } |
| 322 | 322 | ?> |
@@ -485,9 +485,9 @@ discard block |
||
| 485 | 485 | * @return array The settings. |
| 486 | 486 | */ |
| 487 | 487 | public function all() { |
| 488 | - $option_name = 'gravityformsaddon_' . $this->_slug . '_app_settings'; |
|
| 488 | + $option_name = 'gravityformsaddon_' . $this->_slug . '_app_settings'; |
|
| 489 | 489 | |
| 490 | - if( is_multisite() ) { |
|
| 490 | + if ( is_multisite() ) { |
|
| 491 | 491 | $option_value = get_blog_option( get_main_site_id(), $option_name, array() ); |
| 492 | 492 | } else { |
| 493 | 493 | $option_value = get_site_option( $option_name, array() ); |
@@ -542,15 +542,15 @@ discard block |
||
| 542 | 542 | * @return string The HTML |
| 543 | 543 | */ |
| 544 | 544 | public function as_html( $field, $echo = true ) { |
| 545 | - $field['type'] = ( isset( $field['type'] ) && in_array( $field['type'], array( 'submit','reset','button' ) ) ) ? $field['type'] : 'submit'; |
|
| 545 | + $field[ 'type' ] = ( isset( $field[ 'type' ] ) && in_array( $field[ 'type' ], array( 'submit', 'reset', 'button' ) ) ) ? $field[ 'type' ] : 'submit'; |
|
| 546 | 546 | |
| 547 | 547 | $attributes = $this->get_field_attributes( $field ); |
| 548 | 548 | $default_value = Utils::get( $field, 'value', Utils::get( $field, 'default_value' ) ); |
| 549 | - $value = $this->get( $field['name'], $default_value ); |
|
| 549 | + $value = $this->get( $field[ 'name' ], $default_value ); |
|
| 550 | 550 | |
| 551 | 551 | |
| 552 | - $attributes['class'] = isset( $attributes['class'] ) ? esc_attr( $attributes['class'] ) : 'button-primary gfbutton'; |
|
| 553 | - $name = ( $field['name'] === 'gform-settings-save' ) ? $field['name'] : '_gaddon_setting_' . $field['name']; |
|
| 552 | + $attributes[ 'class' ] = isset( $attributes[ 'class' ] ) ? esc_attr( $attributes[ 'class' ] ) : 'button-primary gfbutton'; |
|
| 553 | + $name = ( $field[ 'name' ] === 'gform-settings-save' ) ? $field[ 'name' ] : '_gaddon_setting_' . $field[ 'name' ]; |
|
| 554 | 554 | |
| 555 | 555 | if ( empty( $value ) ) { |
| 556 | 556 | $value = __( 'Update Settings', 'gravityview' ); |
@@ -559,7 +559,7 @@ discard block |
||
| 559 | 559 | $attributes = $this->get_field_attributes( $field ); |
| 560 | 560 | |
| 561 | 561 | $html = '<input |
| 562 | - type="' . $field['type'] . '" |
|
| 562 | + type="' . $field[ 'type' ] . '" |
|
| 563 | 563 | name="' . esc_attr( $name ) . '" |
| 564 | 564 | value="' . $value . '" ' . |
| 565 | 565 | implode( ' ', $attributes ) . |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | * @return bool |
| 591 | 591 | */ |
| 592 | 592 | public function is_save_postback() { |
| 593 | - return isset( $_POST['gform-settings-save'] ) && isset( $_POST['_gravityview_save_settings_nonce'] ); |
|
| 593 | + return isset( $_POST[ 'gform-settings-save' ] ) && isset( $_POST[ '_gravityview_save_settings_nonce' ] ); |
|
| 594 | 594 | } |
| 595 | 595 | |
| 596 | 596 | /** |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | */ |
| 601 | 601 | public function license_key_notice() { |
| 602 | 602 | |
| 603 | - if( $this->is_save_postback() ) { |
|
| 603 | + if ( $this->is_save_postback() ) { |
|
| 604 | 604 | $settings = $this->get_posted_settings(); |
| 605 | 605 | $license_key = \GV\Utils::get( $settings, 'license_key' ); |
| 606 | 606 | $license_status = \GV\Utils::get( $settings, 'license_key_status', 'inactive' ); |
@@ -621,7 +621,7 @@ discard block |
||
| 621 | 621 | * but didn't want to mess up the translation strings for the translators. |
| 622 | 622 | */ |
| 623 | 623 | $message = mb_substr( $message, 0, mb_strlen( $message ) - 1 ); |
| 624 | - $title = __( 'Inactive License', 'gravityview'); |
|
| 624 | + $title = __( 'Inactive License', 'gravityview' ); |
|
| 625 | 625 | $status = ''; |
| 626 | 626 | $update_below = false; |
| 627 | 627 | $primary_button_link = admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ); |
@@ -651,7 +651,7 @@ discard block |
||
| 651 | 651 | $update_below = __( 'Activate your license key below.', 'gravityview' ); |
| 652 | 652 | break; |
| 653 | 653 | } |
| 654 | - $url = 'https://gravityview.co/pricing/?utm_source=admin_notice&utm_medium=admin&utm_content='.$license_status.'&utm_campaign=Admin%20Notice'; |
|
| 654 | + $url = 'https://gravityview.co/pricing/?utm_source=admin_notice&utm_medium=admin&utm_content=' . $license_status . '&utm_campaign=Admin%20Notice'; |
|
| 655 | 655 | |
| 656 | 656 | // Show a different notice on settings page for inactive licenses (hide the buttons) |
| 657 | 657 | if ( $update_below && gravityview()->request->is_admin( '', 'settings' ) ) { |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | public function scripts() { |
| 696 | 696 | $scripts = parent::scripts(); |
| 697 | 697 | |
| 698 | - $scripts[] = array( |
|
| 698 | + $scripts[ ] = array( |
|
| 699 | 699 | 'handle' => 'gform_tooltip_init', |
| 700 | 700 | 'enqueue' => array( |
| 701 | 701 | array( |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | public function styles() { |
| 715 | 715 | $styles = parent::styles(); |
| 716 | 716 | |
| 717 | - $styles[] = array( |
|
| 717 | + $styles[ ] = array( |
|
| 718 | 718 | 'handle' => 'gravityview_settings', |
| 719 | 719 | 'src' => plugins_url( 'assets/css/admin-settings.css', GRAVITYVIEW_FILE ), |
| 720 | 720 | 'version' => Plugin::$version, |
@@ -745,7 +745,7 @@ discard block |
||
| 745 | 745 | * If multisite and not network admin, we don't want the settings to show. |
| 746 | 746 | * @since 1.7.6 |
| 747 | 747 | */ |
| 748 | - $show_submenu = ( ! is_multisite() ) || is_main_site() || ( ! gravityview()->plugin->is_network_activated() ) || ( is_network_admin() && gravityview()->plugin->is_network_activated() ); |
|
| 748 | + $show_submenu = ( ! is_multisite() ) || is_main_site() || ( ! gravityview()->plugin->is_network_activated() ) || ( is_network_admin() && gravityview()->plugin->is_network_activated() ); |
|
| 749 | 749 | |
| 750 | 750 | /** |
| 751 | 751 | * Override whether to show the Settings menu on a per-blog basis. |
@@ -793,26 +793,26 @@ discard block |
||
| 793 | 793 | 'label' => __( 'License Key', 'gravityview' ), |
| 794 | 794 | 'description' => __( 'Enter the license key that was sent to you on purchase. This enables plugin updates & support.', 'gravityview' ) . $this->get_license_handler()->license_details( $this->get_app_setting( 'license_key_response' ) ), |
| 795 | 795 | 'type' => 'edd_license', |
| 796 | - 'disabled' => ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ), |
|
| 796 | + 'disabled' => ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ), |
|
| 797 | 797 | 'data-pending-text' => __( 'Verifying license…', 'gravityview' ), |
| 798 | - 'default_value' => $default_settings['license_key'], |
|
| 798 | + 'default_value' => $default_settings[ 'license_key' ], |
|
| 799 | 799 | 'class' => ( '' == $this->get( 'license_key' ) ) ? 'activate code regular-text edd-license-key' : 'deactivate code regular-text edd-license-key', |
| 800 | 800 | ), |
| 801 | 801 | array( |
| 802 | 802 | 'name' => 'license_key_response', |
| 803 | - 'default_value' => $default_settings['license_key_response'], |
|
| 803 | + 'default_value' => $default_settings[ 'license_key_response' ], |
|
| 804 | 804 | 'type' => 'hidden', |
| 805 | 805 | ), |
| 806 | 806 | array( |
| 807 | 807 | 'name' => 'license_key_status', |
| 808 | - 'default_value' => $default_settings['license_key_status'], |
|
| 808 | + 'default_value' => $default_settings[ 'license_key_status' ], |
|
| 809 | 809 | 'type' => 'hidden', |
| 810 | 810 | ), |
| 811 | 811 | array( |
| 812 | 812 | 'name' => 'support-email', |
| 813 | 813 | 'type' => 'text', |
| 814 | 814 | 'validate' => 'email', |
| 815 | - 'default_value' => $default_settings['support-email'], |
|
| 815 | + 'default_value' => $default_settings[ 'support-email' ], |
|
| 816 | 816 | 'label' => __( 'Support Email', 'gravityview' ), |
| 817 | 817 | 'description' => __( 'In order to provide responses to your support requests, please provide your email address.', 'gravityview' ), |
| 818 | 818 | 'class' => 'code regular-text', |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | 'name' => 'support_port', |
| 825 | 825 | 'type' => 'radio', |
| 826 | 826 | 'label' => __( 'Show Support Port?', 'gravityview' ), |
| 827 | - 'default_value' => $default_settings['support_port'], |
|
| 827 | + 'default_value' => $default_settings[ 'support_port' ], |
|
| 828 | 828 | 'horizontal' => 1, |
| 829 | 829 | 'choices' => array( |
| 830 | 830 | array( |
@@ -843,7 +843,7 @@ discard block |
||
| 843 | 843 | 'name' => 'no-conflict-mode', |
| 844 | 844 | 'type' => 'radio', |
| 845 | 845 | 'label' => __( 'No-Conflict Mode', 'gravityview' ), |
| 846 | - 'default_value' => $default_settings['no-conflict-mode'], |
|
| 846 | + 'default_value' => $default_settings[ 'no-conflict-mode' ], |
|
| 847 | 847 | 'horizontal' => 1, |
| 848 | 848 | 'choices' => array( |
| 849 | 849 | array( |
@@ -865,7 +865,7 @@ discard block |
||
| 865 | 865 | 'name' => 'rest_api', |
| 866 | 866 | 'type' => 'radio', |
| 867 | 867 | 'label' => __( 'REST API', 'gravityview' ), |
| 868 | - 'default_value' => $default_settings['rest_api'], |
|
| 868 | + 'default_value' => $default_settings[ 'rest_api' ], |
|
| 869 | 869 | 'horizontal' => 1, |
| 870 | 870 | 'choices' => array( |
| 871 | 871 | array( |
@@ -884,7 +884,7 @@ discard block |
||
| 884 | 884 | 'name' => 'beta', |
| 885 | 885 | 'type' => 'checkbox', |
| 886 | 886 | 'label' => __( 'Become a Beta Tester', 'gravityview' ), |
| 887 | - 'default_value' => $default_settings['beta'], |
|
| 887 | + 'default_value' => $default_settings[ 'beta' ], |
|
| 888 | 888 | 'horizontal' => 1, |
| 889 | 889 | 'choices' => array( |
| 890 | 890 | array( |
@@ -917,17 +917,17 @@ discard block |
||
| 917 | 917 | * @since 1.7.4 |
| 918 | 918 | */ |
| 919 | 919 | foreach ( $fields as &$field ) { |
| 920 | - $field['name'] = isset( $field['name'] ) ? $field['name'] : Utils::get( $field, 'id' ); |
|
| 921 | - $field['label'] = isset( $field['label'] ) ? $field['label'] : Utils::get( $field, 'title' ); |
|
| 922 | - $field['default_value'] = isset( $field['default_value'] ) ? $field['default_value'] : Utils::get( $field, 'default' ); |
|
| 923 | - $field['description'] = isset( $field['description'] ) ? $field['description'] : Utils::get( $field, 'subtitle' ); |
|
| 920 | + $field[ 'name' ] = isset( $field[ 'name' ] ) ? $field[ 'name' ] : Utils::get( $field, 'id' ); |
|
| 921 | + $field[ 'label' ] = isset( $field[ 'label' ] ) ? $field[ 'label' ] : Utils::get( $field, 'title' ); |
|
| 922 | + $field[ 'default_value' ] = isset( $field[ 'default_value' ] ) ? $field[ 'default_value' ] : Utils::get( $field, 'default' ); |
|
| 923 | + $field[ 'description' ] = isset( $field[ 'description' ] ) ? $field[ 'description' ] : Utils::get( $field, 'subtitle' ); |
|
| 924 | 924 | |
| 925 | 925 | if ( $disabled_attribute ) { |
| 926 | - $field['disabled'] = $disabled_attribute; |
|
| 926 | + $field[ 'disabled' ] = $disabled_attribute; |
|
| 927 | 927 | } |
| 928 | 928 | |
| 929 | - if ( empty( $field['disabled'] ) ) { |
|
| 930 | - unset( $field['disabled'] ); |
|
| 929 | + if ( empty( $field[ 'disabled' ] ) ) { |
|
| 930 | + unset( $field[ 'disabled' ] ); |
|
| 931 | 931 | } |
| 932 | 932 | } |
| 933 | 933 | |
@@ -945,7 +945,7 @@ discard block |
||
| 945 | 945 | ); |
| 946 | 946 | |
| 947 | 947 | if ( $disabled_attribute ) { |
| 948 | - $button['disabled'] = $disabled_attribute; |
|
| 948 | + $button[ 'disabled' ] = $disabled_attribute; |
|
| 949 | 949 | } |
| 950 | 950 | |
| 951 | 951 | /** |
@@ -964,20 +964,20 @@ discard block |
||
| 964 | 964 | // If there are extensions, add a section for them |
| 965 | 965 | if ( ! empty( $extension_sections ) ) { |
| 966 | 966 | |
| 967 | - if( $disabled_attribute ) { |
|
| 967 | + if ( $disabled_attribute ) { |
|
| 968 | 968 | foreach ( $extension_sections as &$section ) { |
| 969 | - foreach ( $section['fields'] as &$field ) { |
|
| 970 | - $field['disabled'] = $disabled_attribute; |
|
| 969 | + foreach ( $section[ 'fields' ] as &$field ) { |
|
| 970 | + $field[ 'disabled' ] = $disabled_attribute; |
|
| 971 | 971 | } |
| 972 | 972 | } |
| 973 | 973 | } |
| 974 | 974 | |
| 975 | - $k = count( $extension_sections ) - 1 ; |
|
| 976 | - $extension_sections[ $k ]['fields'][] = $button; |
|
| 975 | + $k = count( $extension_sections ) - 1; |
|
| 976 | + $extension_sections[ $k ][ 'fields' ][ ] = $button; |
|
| 977 | 977 | $sections = array_merge( $sections, $extension_sections ); |
| 978 | 978 | } else { |
| 979 | 979 | // add the 'update settings' button to the general section |
| 980 | - $sections[0]['fields'][] = $button; |
|
| 980 | + $sections[ 0 ][ 'fields' ][ ] = $button; |
|
| 981 | 981 | } |
| 982 | 982 | |
| 983 | 983 | return $sections; |
@@ -1033,7 +1033,7 @@ discard block |
||
| 1033 | 1033 | protected function settings_edd_license( $field, $echo = true ) { |
| 1034 | 1034 | |
| 1035 | 1035 | if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
| 1036 | - $field['input_type'] = 'password'; |
|
| 1036 | + $field[ 'input_type' ] = 'password'; |
|
| 1037 | 1037 | } |
| 1038 | 1038 | |
| 1039 | 1039 | $text = $this->settings_text( $field, false ); |
@@ -1082,7 +1082,7 @@ discard block |
||
| 1082 | 1082 | public function single_setting_row_html( $field ) { |
| 1083 | 1083 | ?> |
| 1084 | 1084 | |
| 1085 | - <tr id="gaddon-setting-row-<?php echo esc_attr( $field['name'] ); ?>"> |
|
| 1085 | + <tr id="gaddon-setting-row-<?php echo esc_attr( $field[ 'name' ] ); ?>"> |
|
| 1086 | 1086 | <td colspan="2"> |
| 1087 | 1087 | <?php $this->single_setting( $field ); ?> |
| 1088 | 1088 | </td> |
@@ -1100,10 +1100,10 @@ discard block |
||
| 1100 | 1100 | * @return string |
| 1101 | 1101 | */ |
| 1102 | 1102 | public function settings_save( $field, $echo = true ) { |
| 1103 | - $field['type'] = 'submit'; |
|
| 1104 | - $field['name'] = 'gform-settings-save'; |
|
| 1105 | - $field['class'] = isset( $field['class'] ) ? $field['class'] : 'button-primary gfbutton'; |
|
| 1106 | - $field['value'] = Utils::get( $field, 'value', __( 'Update Settings', 'gravityview' ) ); |
|
| 1103 | + $field[ 'type' ] = 'submit'; |
|
| 1104 | + $field[ 'name' ] = 'gform-settings-save'; |
|
| 1105 | + $field[ 'class' ] = isset( $field[ 'class' ] ) ? $field[ 'class' ] : 'button-primary gfbutton'; |
|
| 1106 | + $field[ 'value' ] = Utils::get( $field, 'value', __( 'Update Settings', 'gravityview' ) ); |
|
| 1107 | 1107 | |
| 1108 | 1108 | $output = $this->settings_submit( $field, false ); |
| 1109 | 1109 | |
@@ -1134,8 +1134,8 @@ discard block |
||
| 1134 | 1134 | * @return void |
| 1135 | 1135 | */ |
| 1136 | 1136 | public function single_setting_row( $field ) { |
| 1137 | - $field['gv_description'] = Utils::get( $field, 'description' ); |
|
| 1138 | - $field['description'] = Utils::get( $field, 'subtitle' ); |
|
| 1137 | + $field[ 'gv_description' ] = Utils::get( $field, 'description' ); |
|
| 1138 | + $field[ 'description' ] = Utils::get( $field, 'subtitle' ); |
|
| 1139 | 1139 | parent::single_setting_row( $field ); |
| 1140 | 1140 | } |
| 1141 | 1141 | |
@@ -1147,7 +1147,7 @@ discard block |
||
| 1147 | 1147 | public function single_setting_label( $field ) { |
| 1148 | 1148 | parent::single_setting_label( $field ); |
| 1149 | 1149 | if ( $description = Utils::get( $field, 'gv_description' ) ) { |
| 1150 | - echo '<span class="description">'. $description .'</span>'; |
|
| 1150 | + echo '<span class="description">' . $description . '</span>'; |
|
| 1151 | 1151 | } |
| 1152 | 1152 | } |
| 1153 | 1153 | |
@@ -1184,9 +1184,9 @@ discard block |
||
| 1184 | 1184 | // If the posted key doesn't match the activated/deactivated key (set using the Activate License button, AJAX response), |
| 1185 | 1185 | // then we assume it's changed. If it's changed, unset the status and the previous response. |
| 1186 | 1186 | if ( $local_key !== $response_key ) { |
| 1187 | - unset( $posted_settings['license_key_response'] ); |
|
| 1188 | - unset( $posted_settings['license_key_status'] ); |
|
| 1189 | - \GFCommon::add_error_message( __('The license key you entered has been saved, but not activated. Please activate the license.', 'gravityview' ) ); |
|
| 1187 | + unset( $posted_settings[ 'license_key_response' ] ); |
|
| 1188 | + unset( $posted_settings[ 'license_key_status' ] ); |
|
| 1189 | + \GFCommon::add_error_message( __( 'The license key you entered has been saved, but not activated. Please activate the license.', 'gravityview' ) ); |
|
| 1190 | 1190 | } |
| 1191 | 1191 | return $posted_settings; |
| 1192 | 1192 | } |