@@ -40,11 +40,11 @@ |
||
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $field_options['link_phone'] = array( |
| 43 | - 'type' => 'checkbox', |
|
| 44 | - 'label' => __( 'Make Phone Number Clickable', 'gravityview' ), |
|
| 45 | - 'desc' => __( 'Allow dialing a number by clicking it?', 'gravityview'), |
|
| 46 | - 'value' => true, |
|
| 47 | - ); |
|
| 43 | + 'type' => 'checkbox', |
|
| 44 | + 'label' => __( 'Make Phone Number Clickable', 'gravityview' ), |
|
| 45 | + 'desc' => __( 'Allow dialing a number by clicking it?', 'gravityview'), |
|
| 46 | + 'value' => true, |
|
| 47 | + ); |
|
| 48 | 48 | |
| 49 | 49 | return $field_options; |
| 50 | 50 | } |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | * |
| 124 | 124 | * Verify permissions. Check expected $_POST. Parse args, then send to process_delete_notes |
| 125 | 125 | * |
| 126 | - * @since 1.17 |
|
| 126 | + * @since 1.17 |
|
| 127 | 127 | * |
| 128 | 128 | * @see process_delete_notes |
| 129 | 129 | * |
@@ -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 | */ |
@@ -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 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $gv_modifiers = array( |
| 54 | 54 | 'maxwords:(\d+)' => 'modifier_maxwords', /** @see modifier_maxwords */ |
| 55 | 55 | 'wpautop' => 'modifier_wpautop', /** @see modifier_wpautop */ |
| 56 | - 'timestamp' => 'modifier_timestamp', /** @see modifier_timestamp */ |
|
| 56 | + 'timestamp' => 'modifier_timestamp', /** @see modifier_timestamp */ |
|
| 57 | 57 | ); |
| 58 | 58 | |
| 59 | 59 | $return = $value; |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | |
| 254 | 254 | $atts = array( |
| 255 | 255 | 'format' => self::get_format_from_modifiers( $exploded, false ), |
| 256 | - 'human' => in_array( 'human', $exploded ), // {date_created:human} |
|
| 256 | + 'human' => in_array( 'human', $exploded ), // {date_created:human} |
|
| 257 | 257 | 'diff' => in_array( 'diff', $exploded ), // {date_created:diff} |
| 258 | 258 | 'raw' => in_array( 'raw', $exploded ), // {date_created:raw} |
| 259 | 259 | 'timestamp' => in_array( 'timestamp', $exploded ), // {date_created:timestamp} |
@@ -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 | |
@@ -236,13 +236,13 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | if ( $add_default_properties && ! empty( $field->inputs ) ) { |
| 238 | 238 | foreach ( $field->inputs as $input ) { |
| 239 | - /** |
|
| 240 | - * @hack |
|
| 241 | - * In case of email/email confirmation, the input for email has the same id as the parent field |
|
| 242 | - */ |
|
| 239 | + /** |
|
| 240 | + * @hack |
|
| 241 | + * In case of email/email confirmation, the input for email has the same id as the parent field |
|
| 242 | + */ |
|
| 243 | 243 | if( 'email' === $field->type && false === strpos( $input['id'], '.' ) ) { |
| 244 | - continue; |
|
| 245 | - } |
|
| 244 | + continue; |
|
| 245 | + } |
|
| 246 | 246 | $fields["{$input['id']}"] = array( |
| 247 | 247 | 'label' => rgar( $input, 'label' ), |
| 248 | 248 | 'customLabel' => rgar( $input, 'customLabel' ), |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | } elseif ( 'delete' === RGForms::get( 'action' ) ) { |
| 420 | 420 | $criteria['context_view_id'] = isset( $_GET['view_id'] ) ? intval( $_GET['view_id'] ) : null; |
| 421 | 421 | } elseif( !isset( $criteria['context_view_id'] ) ) { |
| 422 | - // Prevent overriding the Context View ID: Some widgets could set the context_view_id (e.g. Recent Entries widget) |
|
| 422 | + // Prevent overriding the Context View ID: Some widgets could set the context_view_id (e.g. Recent Entries widget) |
|
| 423 | 423 | $criteria['context_view_id'] = null; |
| 424 | 424 | } |
| 425 | 425 | |
@@ -1148,7 +1148,7 @@ discard block |
||
| 1148 | 1148 | ), |
| 1149 | 1149 | ); |
| 1150 | 1150 | |
| 1151 | - $fields = $date_created + $fields; |
|
| 1151 | + $fields = $date_created + $fields; |
|
| 1152 | 1152 | |
| 1153 | 1153 | $blacklist_field_types = apply_filters( 'gravityview_blacklist_field_types', $blacklist, NULL ); |
| 1154 | 1154 | |
@@ -1160,13 +1160,13 @@ discard block |
||
| 1160 | 1160 | } |
| 1161 | 1161 | } |
| 1162 | 1162 | |
| 1163 | - /** |
|
| 1164 | - * @filter `gravityview/common/sortable_fields` Filter the sortable fields |
|
| 1165 | - * @since 1.12 |
|
| 1166 | - * @param array $fields Sub-set of GF form fields that are sortable |
|
| 1167 | - * @param int $formid The Gravity Forms form ID that the fields are from |
|
| 1168 | - */ |
|
| 1169 | - $fields = apply_filters( 'gravityview/common/sortable_fields', $fields, $formid ); |
|
| 1163 | + /** |
|
| 1164 | + * @filter `gravityview/common/sortable_fields` Filter the sortable fields |
|
| 1165 | + * @since 1.12 |
|
| 1166 | + * @param array $fields Sub-set of GF form fields that are sortable |
|
| 1167 | + * @param int $formid The Gravity Forms form ID that the fields are from |
|
| 1168 | + */ |
|
| 1169 | + $fields = apply_filters( 'gravityview/common/sortable_fields', $fields, $formid ); |
|
| 1170 | 1170 | |
| 1171 | 1171 | return $fields; |
| 1172 | 1172 | } |
@@ -1449,17 +1449,17 @@ discard block |
||
| 1449 | 1449 | } |
| 1450 | 1450 | |
| 1451 | 1451 | |
| 1452 | - /** |
|
| 1453 | - * Display updated/error notice |
|
| 1454 | - * |
|
| 1455 | - * @param string $notice text/HTML of notice |
|
| 1456 | - * @param string $class CSS class for notice (`updated` or `error`) |
|
| 1457 | - * |
|
| 1458 | - * @return string |
|
| 1459 | - */ |
|
| 1460 | - public static function generate_notice( $notice, $class = '' ) { |
|
| 1461 | - return '<div class="gv-notice '.gravityview_sanitize_html_class( $class ) .'">'. $notice .'</div>'; |
|
| 1462 | - } |
|
| 1452 | + /** |
|
| 1453 | + * Display updated/error notice |
|
| 1454 | + * |
|
| 1455 | + * @param string $notice text/HTML of notice |
|
| 1456 | + * @param string $class CSS class for notice (`updated` or `error`) |
|
| 1457 | + * |
|
| 1458 | + * @return string |
|
| 1459 | + */ |
|
| 1460 | + public static function generate_notice( $notice, $class = '' ) { |
|
| 1461 | + return '<div class="gv-notice '.gravityview_sanitize_html_class( $class ) .'">'. $notice .'</div>'; |
|
| 1462 | + } |
|
| 1463 | 1463 | |
| 1464 | 1464 | /** |
| 1465 | 1465 | * Inspired on \GFCommon::encode_shortcodes, reverse the encoding by replacing the ascii characters by the shortcode brackets |
@@ -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 | */ |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | 7 => sprintf(__( 'View saved. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>') . $new_form_text, |
| 176 | 176 | 8 => __( 'View submitted.', 'gravityview' ), |
| 177 | 177 | 9 => sprintf( |
| 178 | - /* translators: Date and time the View is scheduled to be published */ |
|
| 178 | + /* translators: Date and time the View is scheduled to be published */ |
|
| 179 | 179 | __( 'View scheduled for: %1$s.', 'gravityview' ), |
| 180 | 180 | // translators: Publish box date format, see http://php.net/date |
| 181 | 181 | date_i18n( __( 'M j, Y @ G:i', 'gravityview' ), strtotime( ( isset( $post->post_date ) ? $post->post_date : NULL ) ) ) |
@@ -232,7 +232,6 @@ discard block |
||
| 232 | 232 | * |
| 233 | 233 | * @deprecated since 1.12 |
| 234 | 234 | * @see GravityView_Compatibility::get_plugin_status() |
| 235 | - |
|
| 236 | 235 | * @return boolean|string True: plugin is active; False: plugin file doesn't exist at path; 'inactive' it's inactive |
| 237 | 236 | */ |
| 238 | 237 | static function get_plugin_status( $location = '' ) { |
@@ -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 | */ |