Skip to content

Commit 48862fa

Browse files
claygriffithssaifsultanc
authored andcommitted
Formatting: Fixed PHPCS issues.
1 parent ba19c90 commit 48862fa

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

experimental/gpi-gpnf-exclude-child-entries-when-attached-to-a-partial-entry.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
* Gravity Perks // Inventory + Nested Forms // Exclude Child Entries of Partial Entry Parents from Inventory
44
* https://gravitywiz.com/documentation/gravity-forms-nested-forms/
55
*
6-
* WIP: This provides very basic support for excluding child entries attached to a partial entry parent
7-
* from inventory limits.
8-
*
6+
* WIP: This provides very basic support for excluding child entries attached to a partial entry parent
7+
* from inventory limits.
8+
*
99
* @todo
10-
*
10+
*
1111
* 1. Apply to all child forms without needing to specify a form ID.
12-
* 2. Count child entries attached to the current partial entry.
13-
* Support has been implemented when traversing between pages; however, the Nested Forms markup AJAX request
14-
* is not aware of the current partial entry ID. Will need to pass this via the `gpnf_session_script_data`
15-
* filter so it can be accessed
12+
* 2. Count child entries attached to the current partial entry.
13+
* Support has been implemented when traversing between pages; however, the Nested Forms markup AJAX request
14+
* is not aware of the current partial entry ID. Will need to pass this via the `gpnf_session_script_data`
15+
* filter so it can be accessed
1616
*/
1717
// Update "123" to your child form ID.
1818
add_filter( 'gpi_query_123', function( $query, $field ) {
1919
global $wpdb;
2020
if ( class_exists( 'GF_Partial_Entries' ) ) {
2121
if ( rgpost( 'partial_entry_id' ) ) {
22-
$meta_value_clause = $wpdb->prepare( "AND meta_value != %s", rgpost( 'partial_entry_id' ) );
22+
$meta_value_clause = $wpdb->prepare( 'AND meta_value != %s', rgpost( 'partial_entry_id' ) );
2323
}
2424
$query['where'] .= "
2525
AND e.id IN (

experimental/gpnf-add-child-entry-on-render.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* https://gravitywiz.com/documentation/gravity-forms-nested-forms/
55
*
66
* Programattically create and attach a child entry to a Nested Form field when the parent form is rendered.
7-
*
7+
*
88
* Please note: A new child entry will be added on every render. You will need to identify your own condition
99
* for when a child entry should be generated and attached.
1010
*/
@@ -44,7 +44,7 @@ function gpnf_session_hash( $form_id ) {
4444
function gpnf_add_child_entry( $parent_entry_id, $nested_form_field_id, $field_values = array(), $parent_form_id = false ) {
4545

4646
if ( ! $parent_form_id ) {
47-
$parent_entry = GFAPI::get_entry( $parent_entry_id );
47+
$parent_entry = GFAPI::get_entry( $parent_entry_id );
4848
$parent_form_id = $parent_entry['form_id'];
4949
}
5050

experimental/gw-gfapc-map-multiple-fields-to-taxonomy.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
*
66
* By default, the Advanced Post Creation add-on does not allow you to map multiple fields to a taxonomy nor does it
77
* allow you to set terms by ID.
8-
*
9-
* This snippet allows to specify multiple fields on a form that have been populated with term IDs (we recommend
8+
*
9+
* This snippet allows to specify multiple fields on a form that have been populated with term IDs (we recommend
1010
* [Populate Anything][1] for this) and to set the taxonomy/terms based on those IDs for the generated post.
1111
*
1212
* [1]: https://gravitywiz.com/documentation/gravity-forms-populate-anything/
1313
*/
1414
add_action( 'gform_advancedpostcreation_post_after_creation', function ( $post_id, $feed, $entry, $form ) {
15-
15+
1616
// Update "1", "2", "3" to the field IDs that have been populated with terms. Add additional IDs as needed.
1717
$term_field_ids = array( 1, 2, 3 );
1818

1919
// Update "categories" to the name of the taxonomy to which the populated terms belong.
2020
$taxonomy = 'categories';
21-
21+
2222
$term_ids = array();
2323
foreach ( $term_field_ids as $term_field_id ) {
2424
$term_ids[] = (int) $entry[ $term_field_id ];
2525
}
26-
26+
2727
wp_set_object_terms( $post_id, $term_ids, $taxonomy );
28-
28+
2929
}, 10, 4 );

gp-populate-anything/gppa-multi-value-contains.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/**
33
* Gravity Perks // Populate Anything // Search by Multiple Values w/ Contains
44
* https://gravitywiz.com/documentation/gravity-forms-populate-anything/
5-
*
6-
* This snippet extends the "contains" operator to support comparisions where a multi-value field (like a Multi Select)
5+
*
6+
* This snippet extends the "contains" operator to support comparisions where a multi-value field (like a Multi Select)
77
* is the needle. Typically, the "in" operator would be used for this; however, it has the limitation of only being able
88
* to match full values rather than checking if any of the needles are contained in the haystack.
99
*/

gp-unique-id/gpuid-use-uid-field-in-conditional-logic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
return isConditionalLogicField || field.type === 'uid';
1212
} );
1313
</script>
14-
<?php
14+
<?php
1515
endif;
1616
} );

gravity-forms/gw-zip-files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function archive_files( $entry, $form ) {
7979
if ( is_wp_error( $nested_entry ) ) {
8080
continue;
8181
}
82-
$nested_form = GFAPI::get_form( $nested_entry['form_id'] );
82+
$nested_form = GFAPI::get_form( $nested_entry['form_id'] );
8383
// Add each nested entry files list as a separate array to avoid overriding previously saved files with the same associative array key (the field id).
8484
$nested_archive_files = array_merge( $nested_archive_files, array( $this->get_entry_files( $nested_entry, $nested_form ) ) );
8585
}

0 commit comments

Comments
 (0)