Skip to content

Commit 8dfa7f6

Browse files
committed
Formatting: PHPCS fixes.
1 parent 044d4f4 commit 8dfa7f6

16 files changed

+38
-35
lines changed

experimental/gpeb-lightbox.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
/**
33
* Gravity Perks // Entry Blocks // Lightbox
44
* https://gravitywiz.com/documentation/gravity-forms-entry-blocks/
5-
*
5+
*
66
* A rough draft lightbox implementation for Entry Blocks!
7-
*
7+
*
88
* Instructions:
9-
*
9+
*
1010
* 1. Install the Multi-file Merge Tag snippet.
1111
* https://gravitywiz.com/customizing-multi-file-merge-tag/
12-
*
12+
*
1313
* 2. Copy and paste this snippet into your theme's functions.php or wherever you include custom PHP.
1414
*
1515
* 3. That's it. 😉
@@ -20,9 +20,9 @@
2020
'markup' => array(
2121
array(
2222
'file_types' => array( 'jpg', 'jpeg' ),
23-
'markup' => '<div class="gpeb-image"><a href="{url}" class="gpep-image-link"><img src="{url}" width="100%" /></a></div>'
24-
)
25-
)
23+
'markup' => '<div class="gpeb-image"><a href="{url}" class="gpep-image-link"><img src="{url}" width="100%" /></a></div>',
24+
),
25+
),
2626
) );
2727
wp_enqueue_script( 'magnific', 'https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js', array( 'jquery' ), '1.1.0', true );
2828
wp_enqueue_style( 'magnific', 'https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css', array(), '1.1.0' );

experimental/gpnf-comma-delimited-email-list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
/**
33
* Gravity Perks // Nested Forms // Convert Simple List to Comma-delimited List of Emails
44
* https://gravitywiz.com/documentation/gravity-forms-nested-forms/
5-
*
5+
*
66
* Requires the All Fields Template plugin: https://gravitywiz.com/gravity-forms-all-fields-template/
77
*
88
* Example usage: {My Nested Form Field:1:filter[2]:listemails}
9-
*
9+
*
1010
* - where "1" is the ID of yoru Nested Form field.
1111
* - "2" is the ID of the Email field on your child form.
1212
* - and the "listemails" modifier activates this snippet.

gp-address-autocomplete/gpaa-autocomplete-by-city.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function disable_unused_inputs( $form ) {
105105
if ( ! $this->is_applicable_form( $form ) ) {
106106
return $form;
107107
}
108-
foreach( $form['fields'] as &$field ) {
108+
foreach ( $form['fields'] as &$field ) {
109109
if ( ! $this->is_applicable_field( $field->id ) ) {
110110
continue;
111111
}

gp-advanced-save-and-continue/gpasc-draft-groups.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
* https://gravitywiz.com/documentation/gravity-forms-advanced-save-continue/
55
*
66
* Instruction Video: https://www.loom.com/share/d8fae1209023492f8a163401b934b052
7-
*
8-
* Create draft groups where only drafts saved from a URL with the same group ID
7+
*
8+
* Create draft groups where only drafts saved from a URL with the same group ID
99
* (specified by a query parameter) will be displayed when that query parameter is
1010
* present.
1111
*/
1212
add_filter( 'gpasc_form_resume_tokens', function( $tokens, $form_id ) {
1313
// Update "order_id" to your desired query parameter.
1414
$target_parameter = 'order_id';
15-
$target_value = rgget( $target_parameter );
15+
$target_value = rgget( $target_parameter );
1616
if ( ! $target_value ) {
1717
return $tokens;
1818
}

gp-blocklist/gpb-set-blocklist-by-field-value.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
* https://gravitywiz.com/documentation/gravity-forms-blocklist/
55
*
66
* Video Instructions: https://www.loom.com/share/95b7192628774a3ebd0a0f47a4acd50a
7-
*
7+
*
88
* Use this snippet to create a blocklist editor form. We recommend using [Populate Anything][1] to
9-
* populate WordPress' current blocklist into the field. The user can then edit the values and submit
9+
* populate WordPress' current blocklist into the field. The user can then edit the values and submit
1010
* the form. This snippet will handle updating the blocklist option in the database.
1111
*
1212
* [1]: https://gravitywiz.com/documentation/gravity-forms-populate-anything/
1313
*/
1414
// Update "123" to your form ID.
1515
add_action( 'gform_after_submission_123', function( $entry, $form ) {
1616
// Update "4" to the field ID whose value should be used to set the blocklist.
17-
update_option('disallowed_keys', rgar( $entry, 4 ) );
17+
update_option( 'disallowed_keys', rgar( $entry, 4 ) );
1818
}, 10, 2 );

gp-easy-passthrough/gpep-edit-entry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function get_passed_through_entry_ids( $form_id ) {
120120

121121
$entry_ids = array();
122122

123-
if ( ! empty( $_POST ) ) {
123+
if ( ! empty( $_POST ) ) {
124124

125125
$posted_value = rgpost( $this->get_passed_through_entries_input_name( $form_id ) );
126126
if ( empty( $posted_value ) ) {
@@ -134,7 +134,7 @@ public function get_passed_through_entry_ids( $form_id ) {
134134

135135
$entry_ids = explode( ',', $entry_ids );
136136

137-
} else if ( ! empty( $this->passed_through_entries ) ) {
137+
} elseif ( ! empty( $this->passed_through_entries ) ) {
138138

139139
$entry_ids = wp_list_pluck( $this->passed_through_entries, 'entry_id' );
140140

gp-entry-blocks/gpeb-add-new-entry.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ public function is_add_entry_request( $is_add_entry_request ) {
5959

6060
public function set_edit_url( $edit_url, $form_id, $entry_id ) {
6161
if ( get_queried_object_id() == $this->_args['page_id'] ) {
62-
$edit_url = add_query_arg( array( 'edit_entry' => $entry_id, 'is_new' => 1 ), get_permalink( $this->_args['page_id'] ) );
62+
$edit_url = add_query_arg( array(
63+
'edit_entry' => $entry_id,
64+
'is_new' => 1,
65+
), get_permalink( $this->_args['page_id'] ) );
6366
}
6467
return $edit_url;
6568
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
33
* This snippet has evolved! 🦄
4-
* Find the latest version of this snippet here:
4+
* Find the latest version of this snippet here:
55
* https://github.com/gravitywiz/snippet-library/blob/master/gp-entry-blocks/gpeb-remove-fields-on-edit.php
66
*/

gp-entry-blocks/gpeb-restart-workflow-on-edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
// Update "123" with your form ID.
88
if ( $form['id'] == 123
99
&& class_exists( 'Gravity_Flow_API' )
10-
&& is_callable( 'gp_entry_blocks' )
11-
&& gp_entry_blocks()->block_edit_form->has_submitted_edited_entry()
10+
&& is_callable( 'gp_entry_blocks' )
11+
&& gp_entry_blocks()->block_edit_form->has_submitted_edited_entry()
1212
) {
1313
$api = new Gravity_Flow_API( $form['id'] );
1414
$api->restart_workflow( $entry );

gp-inventory/gpi-hide-form-if-preselected-choice-is-exhausted.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
/**
33
* Gravity Perks // Inventory // Hide Form if Preselected Choice is Exhausted
44
* https://gravitywiz.com/documentation/gravity-forms-inventory/
5-
*
5+
*
66
* This snippet allows you to hide the form if you're using dynamic population to preselect a choice
77
* and that choice's inventory is exhausted.
88
*/
99
// Update "123" to your form ID.
1010
add_filter( 'gform_pre_render_123', function( $form, $ajax, $field_values ) {
1111
add_filter( "gform_get_form_filter_{$form['id']}", function( $markup, $form ) use ( $field_values ) {
1212
// Update "4" to the ID of your inventory-enabled field.
13-
$field = GFAPI::get_field( $form, 4 );
14-
$value = GFFormsModel::get_field_value( $field, $field_values );
13+
$field = GFAPI::get_field( $form, 4 );
14+
$value = GFFormsModel::get_field_value( $field, $field_values );
1515
$choice = rgar( gp_inventory_type_choices()->get_selected_choices( $field, $value ), 0 );
1616
$count = gp_inventory_type_choices()->get_choice_count( $value, $field, $field->formId );
1717
$limit = gp_inventory_type_choices()->get_choice_inventory_limit( $choice, $field, $form );

gp-nested-forms/gpnf-template-single-submission-child-form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Gravity Perks // Nested Forms // Single Submission Child Form
44
* https://gravitywiz.com/documentation/gravity-forms-nested-forms/
5-
*
5+
*
66
* Instruction Video: https://www.loom.com/share/0416ee154c2f4e4b88f3c1ad67023a1c
77
*/
88
add_filter( 'gp_template_output_nested-entries', function( $markup, $located_template, $load, $args ) {

gp-populate-anything/gppa-change-fill-out-other-fields-text.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* https://gravitywiz.com/documentation/gravity-forms-populate-anything/
55
*/
66
add_filter( 'gppa_missing_filter_text', function( $value, $field ) {
7-
if ( $field->id = 4 ) {
8-
$value = 'Use Search Field Above to Get Results'
9-
}
10-
return $value;
7+
if ( $field->id = 4 ) {
8+
$value = 'Use Search Field Above to Get Results'
9+
}
10+
return $value;
1111
}, 10, 2 );

gp-unique-id/gpuid-yearly-sequential-ids.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* GP Unique ID // Gravity Perks // Creates Yearly Sequential IDs
44
* https://gravitywiz.com/documentation/gravity-forms-unique-id/
55
*
6-
* Make the sequence for a given Unique ID field specific to the current year. The sequence
6+
* Make the sequence for a given Unique ID field specific to the current year. The sequence
77
* will automatically reset each year.
88
*/
99
// Update "123" to your form ID and "4" to your Unique ID field.

gravity-forms/gfur-set-wp-default-profile-picture.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Video: https://www.loom.com/share/e36fe58e7b8740248d287e9492c0ee7a
77
*/
88
add_filter( 'pre_get_avatar', function( $avatar, $id_or_email, $args ) {
9-
// Update "profile_picture" to whatever custom field (e.g. user meta) you will be saving the profile picture to.
9+
// Update "profile_picture" to whatever custom field (e.g. user meta) you will be saving the profile picture to.
1010
$profile_picture = get_user_meta( $id_or_email, 'profile_picture', true );
1111
if ( $profile_picture ) {
1212
$avatar = sprintf( '<img alt="" src="%s" class="avatar avatar-64 photo" height="%d" width="%d" loading="%s" decoding="%s">', $profile_picture, $args['width'], $args['height'], $args['loading'], $args['decoding'] );

gravity-forms/gw-conditional-logic-entry-meta.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ public function get_conditional_logic_options() {
108108
'<' => 'lessThan',
109109
'contains' => 'contains',
110110
'starts_with' => 'startsWith',
111-
'ends_with' => 'endsWith'
111+
'ends_with' => 'endsWith',
112112
),
113-
)
113+
),
114114
);
115115
$form = GFAPI::get_form( is_array( $form_ids ) ? $form_ids[0] : $form_ids );
116116
if ( $form ) {

gravity-forms/gw-currency-symbol-right-to-left.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* http://gravitywiz.com/how-do-i-move-the-currency-symbol-from-the-right-to-the-left-for-gravity-forms/
55
*/
66
add_filter( 'gform_currencies', function( $currencies ) {
7-
$currencies['EUR']['symbol_left'] = '&#8364;';
7+
$currencies['EUR']['symbol_left'] = '&#8364;';
88
$currencies['EUR']['symbol_right'] = '';
99
return $currencies;
1010
} );

0 commit comments

Comments
 (0)