@@ -220,6 +220,9 @@ |
||
220 | 220 | |
221 | 221 | } |
222 | 222 | |
223 | + /** |
|
224 | + * @param string $key |
|
225 | + */ |
|
223 | 226 | public function getCurrentFieldSetting( $key ) { |
224 | 227 | $settings = $this->getCurrentField('field_settings'); |
225 | 228 |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | * |
317 | 317 | * @param array $file_paths List of template paths ordered |
318 | 318 | * |
319 | - * @return array File paths with `./` and `./partials/` paths added |
|
319 | + * @return string[] File paths with `./` and `./partials/` paths added |
|
320 | 320 | */ |
321 | 321 | public function add_template_path( $file_paths ) { |
322 | 322 | |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | * @param array $entry |
486 | 486 | * @param array $data Note details array |
487 | 487 | * |
488 | - * @return int|WP_Error |
|
488 | + * @return integer |
|
489 | 489 | */ |
490 | 490 | private function add_note( $entry, $data ) { |
491 | 491 | global $current_user, $wpdb; |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | * |
585 | 585 | * @since 1.17 |
586 | 586 | * |
587 | - * @param int|string $entry_slug Current entry unique ID |
|
587 | + * @param string $entry_slug Current entry unique ID |
|
588 | 588 | * |
589 | 589 | * @return string HTML output |
590 | 590 | */ |
@@ -185,7 +185,6 @@ discard block |
||
185 | 185 | * Returns the list of available forms |
186 | 186 | * |
187 | 187 | * @access public |
188 | - * @param mixed $form_id |
|
189 | 188 | * @return array Empty array if GFAPI isn't available or no forms. Otherwise, associative array with id, title keys |
190 | 189 | */ |
191 | 190 | public static function get_forms() { |
@@ -206,7 +205,7 @@ discard block |
||
206 | 205 | * Return array of fields' id and label, for a given Form ID |
207 | 206 | * |
208 | 207 | * @access public |
209 | - * @param string|array $form_id (default: '') or $form object |
|
208 | + * @param string|array $form (default: '') or $form object |
|
210 | 209 | * @return array |
211 | 210 | */ |
212 | 211 | public static function get_form_fields( $form = '', $add_default_properties = false, $include_parent_field = true ) { |
@@ -907,7 +906,7 @@ discard block |
||
907 | 906 | * |
908 | 907 | * @param array $form Gravity Forms form array |
909 | 908 | * @param string $field_id ID of the field. If an input, full input ID (like `1.3`) |
910 | - * @param string|array $field_value Raw value of the field. |
|
909 | + * @param string $field_value Raw value of the field. |
|
911 | 910 | * @return string |
912 | 911 | */ |
913 | 912 | public static function get_field_label( $form = array(), $field_id = '', $field_value = '' ) { |
@@ -1551,9 +1550,9 @@ discard block |
||
1551 | 1550 | * @param string $message Message body (required) |
1552 | 1551 | * @param string $from_name Displayed name of the sender |
1553 | 1552 | * @param string $message_format If "html", sent text as `text/html`. Otherwise, `text/plain`. Default: "html". |
1554 | - * @param string|array $attachments Optional. Files to attach. {@see wp_mail()} for usage. Default: "". |
|
1553 | + * @param string $attachments Optional. Files to attach. {@see wp_mail()} for usage. Default: "". |
|
1555 | 1554 | * @param array|false $entry Gravity Forms entry array, related to the email. Default: false. |
1556 | - * @param array|false $notification Gravity Forms notification that triggered the email. {@see GFCommon::send_notification}. Default:false. |
|
1555 | + * @param boolean $notification Gravity Forms notification that triggered the email. {@see GFCommon::send_notification}. Default:false. |
|
1557 | 1556 | */ |
1558 | 1557 | public static function send_email( $from, $to, $bcc, $reply_to, $subject, $message, $from_name = '', $message_format = 'html', $attachments = '', $entry = false, $notification = false ) { |
1559 | 1558 |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | } |
256 | 256 | |
257 | 257 | |
258 | - if( GFCommon::is_product_field( $field->type ) ){ |
|
258 | + if( GFCommon::is_product_field( $field->type ) ) { |
|
259 | 259 | $has_product_fields = true; |
260 | 260 | } |
261 | 261 | |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | |
316 | 316 | $fields = array(); |
317 | 317 | |
318 | - foreach ( $extra_fields as $key => $field ){ |
|
318 | + foreach ( $extra_fields as $key => $field ) { |
|
319 | 319 | if ( ! empty( $only_default_column ) && ! empty( $field['is_default_column'] ) ) { |
320 | 320 | $fields[ $key ] = array( 'label' => $field['label'], 'type' => 'entry_meta' ); |
321 | 321 | } |
@@ -881,7 +881,7 @@ discard block |
||
881 | 881 | * @return GF_Field|null Gravity Forms field object, or NULL: Gravity Forms GFFormsModel does not exist or field at $field_id doesn't exist. |
882 | 882 | */ |
883 | 883 | public static function get_field( $form, $field_id ) { |
884 | - if ( class_exists( 'GFFormsModel' ) ){ |
|
884 | + if ( class_exists( 'GFFormsModel' ) ) { |
|
885 | 885 | return GFFormsModel::get_field( $form, $field_id ); |
886 | 886 | } else { |
887 | 887 | return null; |
@@ -928,7 +928,7 @@ discard block |
||
928 | 928 | $shortcodes = array(); |
929 | 929 | |
930 | 930 | preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ); |
931 | - if ( empty( $matches ) ){ |
|
931 | + if ( empty( $matches ) ) { |
|
932 | 932 | return false; |
933 | 933 | } |
934 | 934 | |
@@ -1408,7 +1408,7 @@ discard block |
||
1408 | 1408 | public static function array_merge_recursive_distinct( array &$array1, array &$array2 ) { |
1409 | 1409 | $merged = $array1; |
1410 | 1410 | |
1411 | - foreach ( $array2 as $key => &$value ) { |
|
1411 | + foreach ( $array2 as $key => &$value ) { |
|
1412 | 1412 | if ( is_array( $value ) && isset( $merged[ $key ] ) && is_array( $merged[ $key ] ) ) { |
1413 | 1413 | $merged[ $key ] = self::array_merge_recursive_distinct( $merged[ $key ], $value ); |
1414 | 1414 | } else { |
@@ -41,7 +41,6 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @see GVCommon::get_forms() |
43 | 43 | * @access public |
44 | - * @param mixed $form_id |
|
45 | 44 | * @return array Empty array if GFAPI isn't available or no forms. Otherwise, associative array with id, title keys |
46 | 45 | */ |
47 | 46 | function gravityview_get_forms() { |
@@ -53,7 +52,7 @@ discard block |
||
53 | 52 | * |
54 | 53 | * @see GVCommon::get_form_fields() |
55 | 54 | * @access public |
56 | - * @param string|array $form_id (default: '') or $form object |
|
55 | + * @param string|array $form (default: '') or $form object |
|
57 | 56 | * @return array |
58 | 57 | */ |
59 | 58 | function gravityview_get_form_fields( $form = '', $add_default_properties = false, $include_parent_field = true ) { |
@@ -91,6 +90,7 @@ discard block |
||
91 | 90 | * @param int|array $form_ids The ID of the form or an array IDs of the Forms. Zero for all forms. |
92 | 91 | * @param mixed $passed_criteria (default: null) |
93 | 92 | * @param mixed &$total (default: null) |
93 | + * @param integer $total |
|
94 | 94 | * @return mixed False: Error fetching entries. Array: Multi-dimensional array of Gravity Forms entry arrays |
95 | 95 | */ |
96 | 96 | function gravityview_get_entries( $form_ids = null, $passed_criteria = null, &$total = null ) { |
@@ -103,7 +103,6 @@ discard block |
||
103 | 103 | * Since 1.4, supports custom entry slugs. The way that GravityView fetches an entry based on the custom slug is by searching `gravityview_unique_id` meta. The `$entry_slug` is fetched by getting the current query var set by `is_single_entry()` |
104 | 104 | * |
105 | 105 | * @access public |
106 | - * @param mixed $entry_id |
|
107 | 106 | * @param boolean $force_allow_ids Force the get_entry() method to allow passed entry IDs, even if the `gravityview_custom_entry_slug_allow_id` filter returns false. |
108 | 107 | * @param boolean $check_entry_display Check whether the entry is visible for the current View configuration. Default: true {@since 1.14} |
109 | 108 | * @return array|boolean |
@@ -190,7 +189,6 @@ discard block |
||
190 | 189 | * |
191 | 190 | * @see GravityView_Template::template_id |
192 | 191 | * |
193 | - * @param int $view_id The ID of the View to get the layout of |
|
194 | 192 | * |
195 | 193 | * @return string GravityView_Template::template_id value. Empty string if not. |
196 | 194 | */ |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | // Dequeue other jQuery styles even if no-conflict is off. |
118 | 118 | // Terrible-looking tabs help no one. |
119 | - if( !empty( $wp_styles->registered ) ) { |
|
119 | + if( !empty( $wp_styles->registered ) ) { |
|
120 | 120 | foreach ($wp_styles->registered as $key => $style) { |
121 | 121 | if( preg_match( '/^(?:wp\-)?jquery/ism', $key ) ) { |
122 | 122 | wp_dequeue_style( $key ); |
@@ -189,8 +189,8 @@ discard block |
||
189 | 189 | |
190 | 190 | //unregistering scripts |
191 | 191 | $registered = array(); |
192 | - foreach( $wp_objects->registered as $handle => $script_registration ){ |
|
193 | - if( in_array( $handle, $required_objects ) ){ |
|
192 | + foreach( $wp_objects->registered as $handle => $script_registration ) { |
|
193 | + if( in_array( $handle, $required_objects ) ) { |
|
194 | 194 | $registered[ $handle ] = $script_registration; |
195 | 195 | } |
196 | 196 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | * |
50 | 50 | * @return string If a custom field label isn't set, return the field label for the password field |
51 | 51 | */ |
52 | - function field_label( $label = '', $field = array(), $form = array(), $entry = array() ){ |
|
52 | + function field_label( $label = '', $field = array(), $form = array(), $entry = array() ) { |
|
53 | 53 | |
54 | 54 | // If using a custom label, no need to fetch the parent label |
55 | 55 | if( ! is_numeric( $field['id'] ) || ! empty( $field['custom_label'] ) ) { |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | /** |
202 | 202 | * Add admin script to the no-conflict scripts whitelist |
203 | 203 | * @param array $allowed Scripts allowed in no-conflict mode |
204 | - * @return array Scripts allowed in no-conflict mode, plus the search widget script |
|
204 | + * @return string[] Scripts allowed in no-conflict mode, plus the search widget script |
|
205 | 205 | */ |
206 | 206 | public function register_no_conflict( $allowed ) { |
207 | 207 | $allowed[] = 'gravityview_searchwidget_admin'; |
@@ -889,7 +889,7 @@ discard block |
||
889 | 889 | /** |
890 | 890 | * Get the label for a search form field |
891 | 891 | * @param array $field Field setting as sent by the GV configuration - has `field`, `input` (input type), and `label` keys |
892 | - * @param array $form_field Form field data, as fetched by `gravityview_get_field()` |
|
892 | + * @param GF_Field|null $form_field Form field data, as fetched by `gravityview_get_field()` |
|
893 | 893 | * @return string Label for the search form |
894 | 894 | */ |
895 | 895 | private static function get_field_label( $field, $form_field = array() ) { |
@@ -1058,7 +1058,7 @@ discard block |
||
1058 | 1058 | /** |
1059 | 1059 | * Require the datepicker script for the frontend GV script |
1060 | 1060 | * @param array $js_dependencies Array of existing required scripts for the fe-views.js script |
1061 | - * @return array Array required scripts, with `jquery-ui-datepicker` added |
|
1061 | + * @return string[] Array required scripts, with `jquery-ui-datepicker` added |
|
1062 | 1062 | */ |
1063 | 1063 | public function add_datepicker_js_dependency( $js_dependencies ) { |
1064 | 1064 | |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | /** |
1071 | 1071 | * Modify the array passed to wp_localize_script() |
1072 | 1072 | * |
1073 | - * @param array $js_localization The data padded to the Javascript file |
|
1073 | + * @param array $localizations The data padded to the Javascript file |
|
1074 | 1074 | * @param array $view_data View data array with View settings |
1075 | 1075 | * |
1076 | 1076 | * @return array |
@@ -36,7 +36,6 @@ |
||
36 | 36 | * @since 1.16.4 |
37 | 37 | * @since 1.17 Moved to GravityView_Plugin_Hooks_Gravity_Forms_Survey class |
38 | 38 | * |
39 | - * @param array $form |
|
40 | 39 | * |
41 | 40 | * @return array Form, with all fields set to `allowsPrepopulate => true` |
42 | 41 | */ |