@@ -346,14 +346,14 @@ discard block |
||
| 346 | 346 | /** |
| 347 | 347 | * update_approved function. |
| 348 | 348 | * |
| 349 | - * @since 1.18 Moved to GravityView_Entry_Approval::update_approved |
|
| 349 | + * @since 1.18 Moved to GravityView_Entry_Approval::update_approved |
|
| 350 | 350 | * @see GravityView_Entry_Approval::update_approved |
| 351 | - * |
|
| 351 | + * |
|
| 352 | 352 | * @param int $entry_id (default: 0) |
| 353 | 353 | * @param int $approved (default: 0) |
| 354 | 354 | * @param int $form_id (default: 0) |
| 355 | 355 | * @param int $approvedcolumn (default: 0) |
| 356 | - * |
|
| 356 | + * |
|
| 357 | 357 | * @return boolean True: It worked; False: it failed |
| 358 | 358 | */ |
| 359 | 359 | public static function update_approved( $entry_id = 0, $approved = 0, $form_id = 0, $approvedcolumn = 0) { |
@@ -363,9 +363,9 @@ discard block |
||
| 363 | 363 | /** |
| 364 | 364 | * Calculate the approve field.input id |
| 365 | 365 | * |
| 366 | - * @since 1.18 Moved to GravityView_Entry_Approval::get_approved_column |
|
| 367 | - * @see GravityView_Entry_Approval::get_approved_column |
|
| 368 | - * |
|
| 366 | + * @since 1.18 Moved to GravityView_Entry_Approval::get_approved_column |
|
| 367 | + * @see GravityView_Entry_Approval::get_approved_column |
|
| 368 | + * |
|
| 369 | 369 | * @param mixed $form GF Form or Form ID |
| 370 | 370 | * @return false|null|string Returns the input ID of the approved field. Returns NULL if no approved fields were found. Returns false if $form_id wasn't set. |
| 371 | 371 | */ |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | 'bulk_actions' => $this->get_bulk_actions( $form_id ), |
| 487 | 487 | 'bulk_message' => $this->bulk_update_message, |
| 488 | 488 | 'unapprove_title' => GravityView_Entry_Approval_Status::get_title_attr('unapproved'), |
| 489 | - 'approve_title' => GravityView_Entry_Approval_Status::get_title_attr('disapproved'), |
|
| 489 | + 'approve_title' => GravityView_Entry_Approval_Status::get_title_attr('disapproved'), |
|
| 490 | 490 | 'disapprove_title' => GravityView_Entry_Approval_Status::get_title_attr('approved'), |
| 491 | 491 | 'column_title' => __( 'Show entry in directory view?', 'gravityview'), |
| 492 | 492 | 'column_link' => esc_url( $this->get_sort_link( $form_id ) ), |
@@ -495,11 +495,11 @@ discard block |
||
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | /** |
| 498 | - * Generate a link to sort by approval status (if there is an Approve/Disapprove field) |
|
| 499 | - * |
|
| 500 | - * Note: Sorting by approval will never be great because it's not possible currently to declare the sorting as |
|
| 501 | - * numeric, but it does group the approved entries together. |
|
| 502 | - * |
|
| 498 | + * Generate a link to sort by approval status (if there is an Approve/Disapprove field) |
|
| 499 | + * |
|
| 500 | + * Note: Sorting by approval will never be great because it's not possible currently to declare the sorting as |
|
| 501 | + * numeric, but it does group the approved entries together. |
|
| 502 | + * |
|
| 503 | 503 | * @param int $form_id |
| 504 | 504 | * |
| 505 | 505 | * @return string Sorting link |
@@ -509,20 +509,20 @@ discard block |
||
| 509 | 509 | $approved_column_id = self::get_approved_column( $form_id ); |
| 510 | 510 | |
| 511 | 511 | if( ! $approved_column_id ) { |
| 512 | - return ''; |
|
| 513 | - } |
|
| 512 | + return ''; |
|
| 513 | + } |
|
| 514 | 514 | |
| 515 | - $order = ( 'desc' === \GV\Utils::_GET( 'order' ) ) ? 'asc' : 'desc'; |
|
| 515 | + $order = ( 'desc' === \GV\Utils::_GET( 'order' ) ) ? 'asc' : 'desc'; |
|
| 516 | 516 | |
| 517 | - $args = array( |
|
| 518 | - 'orderby' => $approved_column_id, |
|
| 519 | - 'order' => $order, |
|
| 520 | - ); |
|
| 517 | + $args = array( |
|
| 518 | + 'orderby' => $approved_column_id, |
|
| 519 | + 'order' => $order, |
|
| 520 | + ); |
|
| 521 | 521 | |
| 522 | - $link = add_query_arg( $args ); |
|
| 522 | + $link = add_query_arg( $args ); |
|
| 523 | 523 | |
| 524 | 524 | return $link; |
| 525 | - } |
|
| 525 | + } |
|
| 526 | 526 | |
| 527 | 527 | /** |
| 528 | 528 | * Get an array of options to be added to the Gravity Forms "Bulk action" dropdown in a "GravityView" option group |
@@ -564,9 +564,9 @@ discard block |
||
| 564 | 564 | // Sanitize the values, just to be sure. |
| 565 | 565 | foreach ( $bulk_actions as $key => $group ) { |
| 566 | 566 | |
| 567 | - if( empty( $group ) ) { |
|
| 568 | - continue; |
|
| 569 | - } |
|
| 567 | + if( empty( $group ) ) { |
|
| 568 | + continue; |
|
| 569 | + } |
|
| 570 | 570 | |
| 571 | 571 | foreach ( $group as $i => $action ) { |
| 572 | 572 | $bulk_actions[ $key ][ $i ]['label'] = esc_html( $bulk_actions[ $key ][ $i ]['label'] ); |
@@ -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 ) ) { |
@@ -193,15 +193,15 @@ discard block |
||
| 193 | 193 | */ |
| 194 | 194 | do_action( 'gravityview/template/table/cells/before', $context ); |
| 195 | 195 | |
| 196 | - /** |
|
| 197 | - * @action `gravityview_table_cells_before` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells. |
|
| 198 | - * @since 1.0.7 |
|
| 196 | + /** |
|
| 197 | + * @action `gravityview_table_cells_before` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells. |
|
| 198 | + * @since 1.0.7 |
|
| 199 | 199 | * @param \GravityView_View $this Current GravityView_View object |
| 200 | 200 | * @deprecated Use `gravityview/template/table/cells/before` |
| 201 | - */ |
|
| 202 | - do_action( 'gravityview_table_cells_before', \GravityView_View::getInstance() ); |
|
| 201 | + */ |
|
| 202 | + do_action( 'gravityview_table_cells_before', \GravityView_View::getInstance() ); |
|
| 203 | 203 | |
| 204 | - foreach ( $fields->all() as $field ) { |
|
| 204 | + foreach ( $fields->all() as $field ) { |
|
| 205 | 205 | $this->the_field( $field, $entry ); |
| 206 | 206 | } |
| 207 | 207 | |
@@ -212,13 +212,13 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | do_action( 'gravityview/template/table/cells/after', $context ); |
| 214 | 214 | |
| 215 | - /** |
|
| 216 | - * @action `gravityview_table_cells_after` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells. |
|
| 217 | - * @since 1.0.7 |
|
| 215 | + /** |
|
| 216 | + * @action `gravityview_table_cells_after` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells. |
|
| 217 | + * @since 1.0.7 |
|
| 218 | 218 | * @param \GravityView_View $this Current GravityView_View object |
| 219 | 219 | * @deprecated Use `gravityview/template/table/cells/after` |
| 220 | - */ |
|
| 221 | - do_action( 'gravityview_table_cells_after', \GravityView_View::getInstance() ); |
|
| 220 | + */ |
|
| 221 | + do_action( 'gravityview_table_cells_after', \GravityView_View::getInstance() ); |
|
| 222 | 222 | |
| 223 | 223 | ?> |
| 224 | 224 | </tr> |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | 'hide_empty' => false, |
| 256 | 256 | 'zone_id' => 'directory_table-columns', |
| 257 | 257 | 'markup' => '<td id="{{ field_id }}" class="{{ class }}">{{ value }}</td>', |
| 258 | - 'form' => $form, |
|
| 258 | + 'form' => $form, |
|
| 259 | 259 | ); |
| 260 | 260 | |
| 261 | 261 | /** Output. */ |
@@ -280,11 +280,11 @@ discard block |
||
| 280 | 280 | do_action( 'gravityview/template/table/body/before', $context ); |
| 281 | 281 | |
| 282 | 282 | /** |
| 283 | - * @action `gravityview_table_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows. |
|
| 284 | - * @deprecated Use `gravityview/template/table/body/before` |
|
| 285 | - * @since 1.0.7 |
|
| 286 | - * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 287 | - */ |
|
| 283 | + * @action `gravityview_table_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows. |
|
| 284 | + * @deprecated Use `gravityview/template/table/body/before` |
|
| 285 | + * @since 1.0.7 |
|
| 286 | + * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 287 | + */ |
|
| 288 | 288 | do_action( 'gravityview_table_body_before', \GravityView_View::getInstance() /** ugh! */ ); |
| 289 | 289 | } |
| 290 | 290 | |
@@ -306,11 +306,11 @@ discard block |
||
| 306 | 306 | do_action( 'gravityview/template/table/body/after', $context ); |
| 307 | 307 | |
| 308 | 308 | /** |
| 309 | - * @action `gravityview_table_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows. |
|
| 310 | - * @deprecated Use `gravityview/template/table/body/after` |
|
| 311 | - * @since 1.0.7 |
|
| 312 | - * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 313 | - */ |
|
| 309 | + * @action `gravityview_table_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows. |
|
| 310 | + * @deprecated Use `gravityview/template/table/body/after` |
|
| 311 | + * @since 1.0.7 |
|
| 312 | + * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 313 | + */ |
|
| 314 | 314 | do_action( 'gravityview_table_body_after', \GravityView_View::getInstance() /** ugh! */ ); |
| 315 | 315 | } |
| 316 | 316 | |
@@ -151,11 +151,11 @@ discard block |
||
| 151 | 151 | do_action( 'gravityview/template/list/body/before', $context ); |
| 152 | 152 | |
| 153 | 153 | /** |
| 154 | - * @action `gravityview_list_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows. |
|
| 155 | - * @deprecated Use `gravityview/template/list/body/before` |
|
| 156 | - * @since 1.0.7 |
|
| 157 | - * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 158 | - */ |
|
| 154 | + * @action `gravityview_list_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows. |
|
| 155 | + * @deprecated Use `gravityview/template/list/body/before` |
|
| 156 | + * @since 1.0.7 |
|
| 157 | + * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 158 | + */ |
|
| 159 | 159 | do_action( 'gravityview_list_body_before', \GravityView_View::getInstance() /** ugh! */ ); |
| 160 | 160 | } |
| 161 | 161 | |
@@ -177,11 +177,11 @@ discard block |
||
| 177 | 177 | do_action( 'gravityview/template/list/body/after', $context ); |
| 178 | 178 | |
| 179 | 179 | /** |
| 180 | - * @action `gravityview_list_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows. |
|
| 181 | - * @deprecated Use `gravityview/template/list/body/after` |
|
| 182 | - * @since 1.0.7 |
|
| 183 | - * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 184 | - */ |
|
| 180 | + * @action `gravityview_list_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows. |
|
| 181 | + * @deprecated Use `gravityview/template/list/body/after` |
|
| 182 | + * @since 1.0.7 |
|
| 183 | + * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 184 | + */ |
|
| 185 | 185 | do_action( 'gravityview_list_body_after', \GravityView_View::getInstance() /** ugh! */ ); |
| 186 | 186 | } |
| 187 | 187 | |
@@ -212,11 +212,11 @@ discard block |
||
| 212 | 212 | $zone = str_replace( '/', '_', $zone ); |
| 213 | 213 | |
| 214 | 214 | /** |
| 215 | - * @action `gravityview_list_entry_$zone_before` Inside the `entry`, before any rows are rendered. Can be used to insert additional rows. |
|
| 216 | - * @deprecated Use `gravityview/template/list/entry/$zone/before` |
|
| 217 | - * @since 1.0.7 |
|
| 218 | - * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 219 | - */ |
|
| 215 | + * @action `gravityview_list_entry_$zone_before` Inside the `entry`, before any rows are rendered. Can be used to insert additional rows. |
|
| 216 | + * @deprecated Use `gravityview/template/list/entry/$zone/before` |
|
| 217 | + * @since 1.0.7 |
|
| 218 | + * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 219 | + */ |
|
| 220 | 220 | do_action( sprintf( 'gravityview_list_entry%sbefore', $zone ), $entry->as_entry(), \GravityView_View::getInstance() /** ugh! */ ); |
| 221 | 221 | } |
| 222 | 222 | |
@@ -247,11 +247,11 @@ discard block |
||
| 247 | 247 | $zone = str_replace( '/', '_', $zone ); |
| 248 | 248 | |
| 249 | 249 | /** |
| 250 | - * @action `gravityview_list_entry_$zone_after` Inside the `entry`, after any rows are rendered. Can be used to insert additional rows. |
|
| 251 | - * @deprecated Use `gravityview/template/list/entry/after` |
|
| 252 | - * @since 1.0.7 |
|
| 253 | - * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 254 | - */ |
|
| 250 | + * @action `gravityview_list_entry_$zone_after` Inside the `entry`, after any rows are rendered. Can be used to insert additional rows. |
|
| 251 | + * @deprecated Use `gravityview/template/list/entry/after` |
|
| 252 | + * @since 1.0.7 |
|
| 253 | + * @param \GravityView_View $gravityview_view Current GravityView_View object. |
|
| 254 | + */ |
|
| 255 | 255 | do_action( sprintf( 'gravityview_list_entry%safter', $zone ), $entry->as_entry(), \GravityView_View::getInstance() /** ugh! */ ); |
| 256 | 256 | } |
| 257 | 257 | } |
@@ -138,20 +138,20 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
| 141 | - * Uninstall all traces of GravityView |
|
| 142 | - * |
|
| 143 | - * Note: method is public because parent method is public |
|
| 144 | - * |
|
| 141 | + * Uninstall all traces of GravityView |
|
| 142 | + * |
|
| 143 | + * Note: method is public because parent method is public |
|
| 144 | + * |
|
| 145 | 145 | * @return bool |
| 146 | 146 | */ |
| 147 | 147 | public function uninstall() { |
| 148 | 148 | gravityview()->plugin->uninstall(); |
| 149 | 149 | |
| 150 | 150 | /** |
| 151 | - * Set the path so that Gravity Forms can de-activate GravityView |
|
| 152 | - * @see GFAddOn::uninstall_addon |
|
| 153 | - * @uses deactivate_plugins() |
|
| 154 | - */ |
|
| 151 | + * Set the path so that Gravity Forms can de-activate GravityView |
|
| 152 | + * @see GFAddOn::uninstall_addon |
|
| 153 | + * @uses deactivate_plugins() |
|
| 154 | + */ |
|
| 155 | 155 | $this->_path = GRAVITYVIEW_FILE; |
| 156 | 156 | |
| 157 | 157 | return true; |
@@ -181,42 +181,42 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | /** |
| 184 | - * Get an array of reasons why the plugin might be uninstalled |
|
| 185 | - * |
|
| 186 | - * @since 1.17.5 |
|
| 187 | - * |
|
| 184 | + * Get an array of reasons why the plugin might be uninstalled |
|
| 185 | + * |
|
| 186 | + * @since 1.17.5 |
|
| 187 | + * |
|
| 188 | 188 | * @return array Array of reasons with the label and followup questions for each uninstall reason |
| 189 | 189 | */ |
| 190 | 190 | private function get_uninstall_reasons() { |
| 191 | 191 | $reasons = array( |
| 192 | 192 | 'will-continue' => array( |
| 193 | - 'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ), |
|
| 194 | - ), |
|
| 193 | + 'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ), |
|
| 194 | + ), |
|
| 195 | 195 | 'no-longer-need' => array( |
| 196 | - 'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ), |
|
| 197 | - ), |
|
| 196 | + 'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ), |
|
| 197 | + ), |
|
| 198 | 198 | 'doesnt-work' => array( |
| 199 | - 'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ), |
|
| 200 | - ), |
|
| 199 | + 'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ), |
|
| 200 | + ), |
|
| 201 | 201 | 'found-other' => array( |
| 202 | - 'label' => esc_html__( 'I found a better plugin', 'gravityview' ), |
|
| 203 | - 'followup' => esc_attr__( 'What plugin you are using, and why?', 'gravityview' ), |
|
| 204 | - ), |
|
| 202 | + 'label' => esc_html__( 'I found a better plugin', 'gravityview' ), |
|
| 203 | + 'followup' => esc_attr__( 'What plugin you are using, and why?', 'gravityview' ), |
|
| 204 | + ), |
|
| 205 | 205 | 'other' => array( |
| 206 | - 'label' => esc_html__( 'Other', 'gravityview' ), |
|
| 207 | - ), |
|
| 206 | + 'label' => esc_html__( 'Other', 'gravityview' ), |
|
| 207 | + ), |
|
| 208 | 208 | ); |
| 209 | 209 | |
| 210 | 210 | shuffle( $reasons ); |
| 211 | 211 | |
| 212 | 212 | return $reasons; |
| 213 | - } |
|
| 213 | + } |
|
| 214 | 214 | |
| 215 | 215 | /** |
| 216 | - * Display a feedback form when the plugin is uninstalled |
|
| 217 | - * |
|
| 218 | - * @since 1.17.5 |
|
| 219 | - * |
|
| 216 | + * Display a feedback form when the plugin is uninstalled |
|
| 217 | + * |
|
| 218 | + * @since 1.17.5 |
|
| 219 | + * |
|
| 220 | 220 | * @return string HTML of the uninstallation form |
| 221 | 221 | */ |
| 222 | 222 | public function uninstall_form() { |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | <h2><?php esc_html_e( 'Why did you uninstall GravityView?', 'gravityview' ); ?></h2> |
| 297 | 297 | <ul> |
| 298 | 298 | <?php |
| 299 | - $reasons = $this->get_uninstall_reasons(); |
|
| 299 | + $reasons = $this->get_uninstall_reasons(); |
|
| 300 | 300 | foreach ( $reasons as $reason ) { |
| 301 | 301 | printf( '<li><label><input name="reason" type="radio" value="other" data-followup="%s"> %s</label></li>', Utils::get( $reason, 'followup' ), Utils::get( $reason, 'label' ) ); |
| 302 | 302 | } |
@@ -390,12 +390,12 @@ discard block |
||
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | public function app_settings_tab() { |
| 393 | - parent::app_settings_tab(); |
|
| 393 | + parent::app_settings_tab(); |
|
| 394 | 394 | |
| 395 | 395 | if ( $this->maybe_uninstall() ) { |
| 396 | - echo $this->uninstall_form(); |
|
| 396 | + echo $this->uninstall_form(); |
|
| 397 | 397 | } |
| 398 | - } |
|
| 398 | + } |
|
| 399 | 399 | |
| 400 | 400 | /** |
| 401 | 401 | * The Settings title |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | * @return array The settings. |
| 481 | 481 | */ |
| 482 | 482 | public function all() { |
| 483 | - return wp_parse_args( get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', array() ), $this->defaults() ); |
|
| 483 | + return wp_parse_args( get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', array() ), $this->defaults() ); |
|
| 484 | 484 | } |
| 485 | 485 | |
| 486 | 486 | /** |
@@ -549,8 +549,8 @@ discard block |
||
| 549 | 549 | type="' . $field['type'] . '" |
| 550 | 550 | name="' . esc_attr( $name ) . '" |
| 551 | 551 | value="' . $value . '" ' . |
| 552 | - implode( ' ', $attributes ) . |
|
| 553 | - ' />'; |
|
| 552 | + implode( ' ', $attributes ) . |
|
| 553 | + ' />'; |
|
| 554 | 554 | |
| 555 | 555 | if ( $echo ) { |
| 556 | 556 | echo $html; |
@@ -577,7 +577,7 @@ discard block |
||
| 577 | 577 | $license_key = $this->get( 'license_key' ); |
| 578 | 578 | if( '' === $license_key ) { |
| 579 | 579 | $license_status = 'inactive'; |
| 580 | - } |
|
| 580 | + } |
|
| 581 | 581 | $license_id = empty( $license_key ) ? 'license' : $license_key; |
| 582 | 582 | |
| 583 | 583 | $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' ); |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | $update_below = false; |
| 593 | 593 | $primary_button_link = admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ); |
| 594 | 594 | |
| 595 | - switch ( $license_status ) { |
|
| 595 | + switch ( $license_status ) { |
|
| 596 | 596 | /** @since 1.17 */ |
| 597 | 597 | case 'expired': |
| 598 | 598 | $title = __( 'Expired License', 'gravityview' ); |
@@ -648,12 +648,12 @@ discard block |
||
| 648 | 648 | } |
| 649 | 649 | |
| 650 | 650 | /** |
| 651 | - * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
| 652 | - * |
|
| 653 | - * @since 1.21.5 |
|
| 654 | - * |
|
| 655 | - * @see GFAddOn::scripts() |
|
| 656 | - * |
|
| 651 | + * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
| 652 | + * |
|
| 653 | + * @since 1.21.5 |
|
| 654 | + * |
|
| 655 | + * @see GFAddOn::scripts() |
|
| 656 | + * |
|
| 657 | 657 | * @return array Array of scripts |
| 658 | 658 | */ |
| 659 | 659 | public function scripts() { |
@@ -662,10 +662,10 @@ discard block |
||
| 662 | 662 | $scripts[] = array( |
| 663 | 663 | 'handle' => 'gform_tooltip_init', |
| 664 | 664 | 'enqueue' => array( |
| 665 | - array( |
|
| 666 | - 'admin_page' => array( 'app_settings' ) |
|
| 667 | - ) |
|
| 668 | - ) |
|
| 665 | + array( |
|
| 666 | + 'admin_page' => array( 'app_settings' ) |
|
| 667 | + ) |
|
| 668 | + ) |
|
| 669 | 669 | ); |
| 670 | 670 | |
| 671 | 671 | return $scripts; |
@@ -683,10 +683,10 @@ discard block |
||
| 683 | 683 | 'src' => plugins_url( 'assets/css/admin-settings.css', GRAVITYVIEW_FILE ), |
| 684 | 684 | 'version' => Plugin::$version, |
| 685 | 685 | 'deps' => array( |
| 686 | - 'gform_admin', |
|
| 686 | + 'gform_admin', |
|
| 687 | 687 | 'gaddon_form_settings_css', |
| 688 | - 'gform_tooltip', |
|
| 689 | - 'gform_font_awesome', |
|
| 688 | + 'gform_tooltip', |
|
| 689 | + 'gform_font_awesome', |
|
| 690 | 690 | ), |
| 691 | 691 | 'enqueue' => array( |
| 692 | 692 | array( 'admin_page' => array( |
@@ -854,7 +854,7 @@ discard block |
||
| 854 | 854 | array( |
| 855 | 855 | 'label' => _x( 'Show me beta versions if they are available.', 'gravityview' ), |
| 856 | 856 | 'value' => '1', |
| 857 | - 'name' => 'beta', |
|
| 857 | + 'name' => 'beta', |
|
| 858 | 858 | ), |
| 859 | 859 | ), |
| 860 | 860 | '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' ), |
@@ -892,38 +892,38 @@ discard block |
||
| 892 | 892 | |
| 893 | 893 | if ( empty( $field['disabled'] ) ) { |
| 894 | 894 | unset( $field['disabled'] ); |
| 895 | - } |
|
| 895 | + } |
|
| 896 | 896 | } |
| 897 | 897 | |
| 898 | - $sections = array( |
|
| 899 | - array( |
|
| 900 | - 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __( 'You are running GravityView version %s', 'gravityview' ), Plugin::$version ) ), |
|
| 901 | - 'fields' => $fields, |
|
| 902 | - ) |
|
| 903 | - ); |
|
| 898 | + $sections = array( |
|
| 899 | + array( |
|
| 900 | + 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __( 'You are running GravityView version %s', 'gravityview' ), Plugin::$version ) ), |
|
| 901 | + 'fields' => $fields, |
|
| 902 | + ) |
|
| 903 | + ); |
|
| 904 | 904 | |
| 905 | - // custom 'update settings' button |
|
| 906 | - $button = array( |
|
| 907 | - 'class' => 'button button-primary button-hero', |
|
| 908 | - 'type' => 'save', |
|
| 909 | - ); |
|
| 905 | + // custom 'update settings' button |
|
| 906 | + $button = array( |
|
| 907 | + 'class' => 'button button-primary button-hero', |
|
| 908 | + 'type' => 'save', |
|
| 909 | + ); |
|
| 910 | 910 | |
| 911 | 911 | if ( $disabled_attribute ) { |
| 912 | 912 | $button['disabled'] = $disabled_attribute; |
| 913 | 913 | } |
| 914 | 914 | |
| 915 | - /** |
|
| 916 | - * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
| 917 | - * Extensions can tap in here to insert their own section and settings. |
|
| 918 | - * <code> |
|
| 919 | - * $sections[] = array( |
|
| 920 | - * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
| 921 | - * 'fields' => $settings, |
|
| 922 | - * ); |
|
| 923 | - * </code> |
|
| 924 | - * @param array $extension_settings Empty array, ready for extension settings! |
|
| 925 | - */ |
|
| 926 | - $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
| 915 | + /** |
|
| 916 | + * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
| 917 | + * Extensions can tap in here to insert their own section and settings. |
|
| 918 | + * <code> |
|
| 919 | + * $sections[] = array( |
|
| 920 | + * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
| 921 | + * 'fields' => $settings, |
|
| 922 | + * ); |
|
| 923 | + * </code> |
|
| 924 | + * @param array $extension_settings Empty array, ready for extension settings! |
|
| 925 | + */ |
|
| 926 | + $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
| 927 | 927 | |
| 928 | 928 | // If there are extensions, add a section for them |
| 929 | 929 | if ( ! empty( $extension_sections ) ) { |
@@ -936,13 +936,13 @@ discard block |
||
| 936 | 936 | } |
| 937 | 937 | } |
| 938 | 938 | |
| 939 | - $k = count( $extension_sections ) - 1 ; |
|
| 940 | - $extension_sections[ $k ]['fields'][] = $button; |
|
| 939 | + $k = count( $extension_sections ) - 1 ; |
|
| 940 | + $extension_sections[ $k ]['fields'][] = $button; |
|
| 941 | 941 | $sections = array_merge( $sections, $extension_sections ); |
| 942 | 942 | } else { |
| 943 | - // add the 'update settings' button to the general section |
|
| 944 | - $sections[0]['fields'][] = $button; |
|
| 945 | - } |
|
| 943 | + // add the 'update settings' button to the general section |
|
| 944 | + $sections[0]['fields'][] = $button; |
|
| 945 | + } |
|
| 946 | 946 | |
| 947 | 947 | return $sections; |
| 948 | 948 | } |
@@ -996,9 +996,9 @@ discard block |
||
| 996 | 996 | */ |
| 997 | 997 | protected function settings_edd_license( $field, $echo = true ) { |
| 998 | 998 | |
| 999 | - if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
|
| 1000 | - $field['input_type'] = 'password'; |
|
| 1001 | - } |
|
| 999 | + if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
|
| 1000 | + $field['input_type'] = 'password'; |
|
| 1001 | + } |
|
| 1002 | 1002 | |
| 1003 | 1003 | $text = $this->settings_text( $field, false ); |
| 1004 | 1004 | |
@@ -1015,9 +1015,9 @@ discard block |
||
| 1015 | 1015 | |
| 1016 | 1016 | /** |
| 1017 | 1017 | * Allow pure HTML settings row |
| 1018 | - * |
|
| 1019 | - * @since 2.0.6 |
|
| 1020 | - * |
|
| 1018 | + * |
|
| 1019 | + * @since 2.0.6 |
|
| 1020 | + * |
|
| 1021 | 1021 | * @param array $field |
| 1022 | 1022 | * @param bool $echo Whether to echo the |
| 1023 | 1023 | * |
@@ -1083,19 +1083,19 @@ discard block |
||
| 1083 | 1083 | } |
| 1084 | 1084 | |
| 1085 | 1085 | /** |
| 1086 | - * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it |
|
| 1087 | - * |
|
| 1088 | - * Converts `$field['description']` to `$field['gv_description']` |
|
| 1089 | - * Converts `$field['subtitle']` to `$field['description']` |
|
| 1090 | - * |
|
| 1091 | - * @see \GV\Addon_Settings::single_setting_label Converts `gv_description` back to `description` |
|
| 1092 | - * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description |
|
| 1093 | - * |
|
| 1094 | - * @since 1.21.5.2 |
|
| 1095 | - * |
|
| 1086 | + * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it |
|
| 1087 | + * |
|
| 1088 | + * Converts `$field['description']` to `$field['gv_description']` |
|
| 1089 | + * Converts `$field['subtitle']` to `$field['description']` |
|
| 1090 | + * |
|
| 1091 | + * @see \GV\Addon_Settings::single_setting_label Converts `gv_description` back to `description` |
|
| 1092 | + * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description |
|
| 1093 | + * |
|
| 1094 | + * @since 1.21.5.2 |
|
| 1095 | + * |
|
| 1096 | 1096 | * @param array $field |
| 1097 | - * |
|
| 1098 | - * @return void |
|
| 1097 | + * |
|
| 1098 | + * @return void |
|
| 1099 | 1099 | */ |
| 1100 | 1100 | public function single_setting_row( $field ) { |
| 1101 | 1101 | $field['gv_description'] = Utils::get( $field, 'description' ); |