@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | * Return array of fields' id and label, for a given Form ID |
| 210 | 210 | * |
| 211 | 211 | * @access public |
| 212 | - * @param string|array $form_id (default: '') or $form object |
|
| 212 | + * @param string|array $form (default: '') or $form object |
|
| 213 | 213 | * @param bool $add_default_properties |
| 214 | 214 | * @param bool $include_parent_field |
| 215 | 215 | * @return array |
@@ -850,7 +850,7 @@ discard block |
||
| 850 | 850 | * |
| 851 | 851 | * @param array $form Gravity Forms form array |
| 852 | 852 | * @param string $field_id ID of the field. If an input, full input ID (like `1.3`) |
| 853 | - * @param string|array $field_value Raw value of the field. |
|
| 853 | + * @param string $field_value Raw value of the field. |
|
| 854 | 854 | * @return string |
| 855 | 855 | */ |
| 856 | 856 | public static function get_field_label( $form = array(), $field_id = '', $field_value = '' ) { |
@@ -1503,9 +1503,9 @@ discard block |
||
| 1503 | 1503 | * @param string $message Message body (required) |
| 1504 | 1504 | * @param string $from_name Displayed name of the sender |
| 1505 | 1505 | * @param string $message_format If "html", sent text as `text/html`. Otherwise, `text/plain`. Default: "html". |
| 1506 | - * @param string|array $attachments Optional. Files to attach. {@see wp_mail()} for usage. Default: "". |
|
| 1506 | + * @param string $attachments Optional. Files to attach. {@see wp_mail()} for usage. Default: "". |
|
| 1507 | 1507 | * @param array|false $entry Gravity Forms entry array, related to the email. Default: false. |
| 1508 | - * @param array|false $notification Gravity Forms notification that triggered the email. {@see GFCommon::send_notification}. Default:false. |
|
| 1508 | + * @param boolean $notification Gravity Forms notification that triggered the email. {@see GFCommon::send_notification}. Default:false. |
|
| 1509 | 1509 | */ |
| 1510 | 1510 | public static function send_email( $from, $to, $bcc, $reply_to, $subject, $message, $from_name = '', $message_format = 'html', $attachments = '', $entry = false, $notification = false ) { |
| 1511 | 1511 | |
@@ -305,12 +305,12 @@ discard block |
||
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | /** |
| 308 | - * @hack |
|
| 309 | - * In case of email/email confirmation, the input for email has the same id as the parent field |
|
| 310 | - */ |
|
| 308 | + * @hack |
|
| 309 | + * In case of email/email confirmation, the input for email has the same id as the parent field |
|
| 310 | + */ |
|
| 311 | 311 | if( 'email' === $field['type'] && false === strpos( $input['id'], '.' ) ) { |
| 312 | - continue; |
|
| 313 | - } |
|
| 312 | + continue; |
|
| 313 | + } |
|
| 314 | 314 | $fields["{$input['id']}"] = array( |
| 315 | 315 | 'label' => \GV\Utils::get( $input, 'label' ), |
| 316 | 316 | 'customLabel' => \GV\Utils::get( $input, 'customLabel' ), |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | } elseif ( 'delete' === GFForms::get( 'action' ) ) { |
| 496 | 496 | $criteria['context_view_id'] = isset( $_GET['view_id'] ) ? intval( $_GET['view_id'] ) : null; |
| 497 | 497 | } elseif( !isset( $criteria['context_view_id'] ) ) { |
| 498 | - // Prevent overriding the Context View ID: Some widgets could set the context_view_id (e.g. Recent Entries widget) |
|
| 498 | + // Prevent overriding the Context View ID: Some widgets could set the context_view_id (e.g. Recent Entries widget) |
|
| 499 | 499 | $criteria['context_view_id'] = null; |
| 500 | 500 | } |
| 501 | 501 | |
@@ -1354,7 +1354,7 @@ discard block |
||
| 1354 | 1354 | ), |
| 1355 | 1355 | ); |
| 1356 | 1356 | |
| 1357 | - $fields = $date_created + $fields; |
|
| 1357 | + $fields = $date_created + $fields; |
|
| 1358 | 1358 | |
| 1359 | 1359 | $blacklist_field_types = apply_filters( 'gravityview_blacklist_field_types', $blacklist, NULL ); |
| 1360 | 1360 | |
@@ -1366,13 +1366,13 @@ discard block |
||
| 1366 | 1366 | } |
| 1367 | 1367 | } |
| 1368 | 1368 | |
| 1369 | - /** |
|
| 1370 | - * @filter `gravityview/common/sortable_fields` Filter the sortable fields |
|
| 1371 | - * @since 1.12 |
|
| 1372 | - * @param array $fields Sub-set of GF form fields that are sortable |
|
| 1373 | - * @param int $formid The Gravity Forms form ID that the fields are from |
|
| 1374 | - */ |
|
| 1375 | - $fields = apply_filters( 'gravityview/common/sortable_fields', $fields, $formid ); |
|
| 1369 | + /** |
|
| 1370 | + * @filter `gravityview/common/sortable_fields` Filter the sortable fields |
|
| 1371 | + * @since 1.12 |
|
| 1372 | + * @param array $fields Sub-set of GF form fields that are sortable |
|
| 1373 | + * @param int $formid The Gravity Forms form ID that the fields are from |
|
| 1374 | + */ |
|
| 1375 | + $fields = apply_filters( 'gravityview/common/sortable_fields', $fields, $formid ); |
|
| 1376 | 1376 | |
| 1377 | 1377 | return $fields; |
| 1378 | 1378 | } |
@@ -1664,26 +1664,26 @@ discard block |
||
| 1664 | 1664 | } |
| 1665 | 1665 | |
| 1666 | 1666 | |
| 1667 | - /** |
|
| 1668 | - * Display updated/error notice |
|
| 1669 | - * |
|
| 1670 | - * @since 1.19.2 Added $cap and $object_id parameters |
|
| 1671 | - * |
|
| 1672 | - * @param string $notice text/HTML of notice |
|
| 1673 | - * @param string $class CSS class for notice (`updated` or `error`) |
|
| 1674 | - * @param string $cap [Optional] Define a capability required to show a notice. If not set, displays to all caps. |
|
| 1675 | - * |
|
| 1676 | - * @return string |
|
| 1677 | - */ |
|
| 1678 | - public static function generate_notice( $notice, $class = '', $cap = '', $object_id = null ) { |
|
| 1679 | - |
|
| 1680 | - // If $cap is defined, only show notice if user has capability |
|
| 1681 | - if( $cap && ! GVCommon::has_cap( $cap, $object_id ) ) { |
|
| 1682 | - return ''; |
|
| 1683 | - } |
|
| 1684 | - |
|
| 1685 | - return '<div class="gv-notice '.gravityview_sanitize_html_class( $class ) .'">'. $notice .'</div>'; |
|
| 1686 | - } |
|
| 1667 | + /** |
|
| 1668 | + * Display updated/error notice |
|
| 1669 | + * |
|
| 1670 | + * @since 1.19.2 Added $cap and $object_id parameters |
|
| 1671 | + * |
|
| 1672 | + * @param string $notice text/HTML of notice |
|
| 1673 | + * @param string $class CSS class for notice (`updated` or `error`) |
|
| 1674 | + * @param string $cap [Optional] Define a capability required to show a notice. If not set, displays to all caps. |
|
| 1675 | + * |
|
| 1676 | + * @return string |
|
| 1677 | + */ |
|
| 1678 | + public static function generate_notice( $notice, $class = '', $cap = '', $object_id = null ) { |
|
| 1679 | + |
|
| 1680 | + // If $cap is defined, only show notice if user has capability |
|
| 1681 | + if( $cap && ! GVCommon::has_cap( $cap, $object_id ) ) { |
|
| 1682 | + return ''; |
|
| 1683 | + } |
|
| 1684 | + |
|
| 1685 | + return '<div class="gv-notice '.gravityview_sanitize_html_class( $class ) .'">'. $notice .'</div>'; |
|
| 1686 | + } |
|
| 1687 | 1687 | |
| 1688 | 1688 | /** |
| 1689 | 1689 | * Inspired on \GFCommon::encode_shortcodes, reverse the encoding by replacing the ascii characters by the shortcode brackets |
@@ -10,6 +10,7 @@ discard block |
||
| 10 | 10 | * @internal |
| 11 | 11 | * @since 2.0 |
| 12 | 12 | * |
| 13 | + * @param \GravityView_View_Data $_this |
|
| 13 | 14 | * @return array|false The old array data, or false on error. |
| 14 | 15 | */ |
| 15 | 16 | function GravityView_View_Data_add_view( $view_id, $atts, $_this ) { |
@@ -62,6 +63,8 @@ discard block |
||
| 62 | 63 | * @internal |
| 63 | 64 | * @since 2.0 |
| 64 | 65 | * |
| 66 | + * @param integer $form_id |
|
| 67 | + * @param integer $count |
|
| 65 | 68 | * @return array The old associative array data as returned by |
| 66 | 69 | * \GravityView_frontend::get_view_entries(), the paging parameters |
| 67 | 70 | * and a total count of all entries. |
@@ -155,6 +158,7 @@ discard block |
||
| 155 | 158 | * @internal |
| 156 | 159 | * @since 2.0 |
| 157 | 160 | * |
| 161 | + * @param string $format |
|
| 158 | 162 | * @return null|string The value of a field in an entry. |
| 159 | 163 | */ |
| 160 | 164 | function GravityView_API_field_value( $entry, $field_settings, $format ) { |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | * |
| 103 | 103 | * @param array $entry The array ID. |
| 104 | 104 | * |
| 105 | - * @return \GV\Entry|null An instance of this entry or null if not found. |
|
| 105 | + * @return null|GF_Entry An instance of this entry or null if not found. |
|
| 106 | 106 | */ |
| 107 | 107 | public static function from_entry( $entry ) { |
| 108 | 108 | if ( empty( $entry['id'] ) ) { |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | * - Checks PHP version numbers |
| 208 | 208 | * - Sets self::$is_compatible[__CLASS__] to boolean value |
| 209 | 209 | * |
| 210 | - * @return boolean Is the extension supported? |
|
| 210 | + * @return boolean|null Is the extension supported? |
|
| 211 | 211 | */ |
| 212 | 212 | protected function is_extension_supported() { |
| 213 | 213 | |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | /** |
| 330 | 330 | * Add a notice to be displayed in the admin. |
| 331 | 331 | * |
| 332 | - * @param array $notice Array with `class` and `message` keys. The message is not escaped. |
|
| 332 | + * @param string $notice Array with `class` and `message` keys. The message is not escaped. |
|
| 333 | 333 | * |
| 334 | 334 | * @return void |
| 335 | 335 | */ |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | * @param \GV\GF_Form $form The Gravity Form form. |
| 55 | 55 | * @param int $field_id The Gravity Form field ID for the $form. |
| 56 | 56 | * |
| 57 | - * @return \GV\Field|null The requested field or null if not found. |
|
| 57 | + * @return null|GF_Field The requested field or null if not found. |
|
| 58 | 58 | */ |
| 59 | 59 | public static function by_id( $form, $field_id ) { |
| 60 | 60 | |
@@ -132,10 +132,8 @@ |
||
| 132 | 132 | /** |
| 133 | 133 | * Get a \GV\Field by Form and Field ID for this data source. |
| 134 | 134 | * |
| 135 | - * @param \GV\GF_Form $form The Gravity Form form ID. |
|
| 136 | - * @param int $field_id The Gravity Form field ID for the $form_id. |
|
| 137 | 135 | * |
| 138 | - * @return \GV\Field|null The requested field or null if not found. |
|
| 136 | + * @return null|GF_Field The requested field or null if not found. |
|
| 139 | 137 | */ |
| 140 | 138 | public static function get_field( /** varargs */ ) { |
| 141 | 139 | $args = func_get_args(); |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | * Generate the status message box HTML based on the current status |
| 351 | 351 | * |
| 352 | 352 | * @since 1.7.4 |
| 353 | - * @param $message |
|
| 353 | + * @param string $message |
|
| 354 | 354 | * @param string $class |
| 355 | 355 | * |
| 356 | 356 | * @return string |
@@ -470,6 +470,9 @@ discard block |
||
| 470 | 470 | $this->settings->update( $settings ); |
| 471 | 471 | } |
| 472 | 472 | |
| 473 | + /** |
|
| 474 | + * @param boolean $echo |
|
| 475 | + */ |
|
| 473 | 476 | public function settings_edd_license_activation( $field, $echo ) { |
| 474 | 477 | $script_debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; |
| 475 | 478 | |
@@ -569,7 +572,6 @@ discard block |
||
| 569 | 572 | * Check the GravityView license information |
| 570 | 573 | * |
| 571 | 574 | * @since 1.19.3 |
| 572 | - * @param bool $force Whether to force checking license, even if AJAX |
|
| 573 | 575 | * |
| 574 | 576 | * @return void |
| 575 | 577 | */ |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | 'author' => self::author, |
| 97 | 97 | 'language' => get_locale(), |
| 98 | 98 | 'url' => home_url(), |
| 99 | - 'beta' => $this->settings->get( 'beta' ), |
|
| 99 | + 'beta' => $this->settings->get( 'beta' ), |
|
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | 102 | if ( ! empty( $action ) ) { |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | private function license_call_update_settings( $license_data, $data ) { |
| 464 | 464 | $settings = array(); |
| 465 | 465 | |
| 466 | - $settings['license_key'] = $license_data->license_key = trim( $data['license'] ); |
|
| 466 | + $settings['license_key'] = $license_data->license_key = trim( $data['license'] ); |
|
| 467 | 467 | $settings['license_key_status'] = $license_data->license; |
| 468 | 468 | $settings['license_key_response'] = (array)$license_data; |
| 469 | 469 | |
@@ -597,14 +597,14 @@ discard block |
||
| 597 | 597 | // Call the custom API. |
| 598 | 598 | $response = wp_remote_post( self::url, array( |
| 599 | 599 | 'timeout' => 15, |
| 600 | - 'sslverify' => false, |
|
| 601 | - 'body' => array( |
|
| 602 | - 'edd_action' => 'check_license', |
|
| 603 | - 'license' => trim( $this->settings->get( 'license_key' ) ), |
|
| 604 | - 'item_name' => self::name, |
|
| 605 | - 'url' => home_url(), |
|
| 606 | - 'site_data' => $this->get_site_data(), |
|
| 607 | - ), |
|
| 600 | + 'sslverify' => false, |
|
| 601 | + 'body' => array( |
|
| 602 | + 'edd_action' => 'check_license', |
|
| 603 | + 'license' => trim( $this->settings->get( 'license_key' ) ), |
|
| 604 | + 'item_name' => self::name, |
|
| 605 | + 'url' => home_url(), |
|
| 606 | + 'site_data' => $this->get_site_data(), |
|
| 607 | + ), |
|
| 608 | 608 | )); |
| 609 | 609 | |
| 610 | 610 | // make sure the response came back okay |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | * Set an setting. |
| 65 | 65 | * |
| 66 | 66 | * @param mixed $key The key in this setting to retrieve. |
| 67 | - * @param mixed $default A default in case the key is not set. |
|
| 67 | + * @param false|null $default A default in case the key is not set. |
|
| 68 | 68 | * |
| 69 | 69 | * @api |
| 70 | 70 | * @since 2.0 |
@@ -174,7 +174,6 @@ |
||
| 174 | 174 | * @param \GV\View $view The View. |
| 175 | 175 | * @param \GV\Entry_Collection $entries The calculated entries. |
| 176 | 176 | * @param array $atts The shortcode attributes (with defaults). |
| 177 | - * @param array $view_atts A quirky compatibility parameter where we get the unaltered view atts. |
|
| 178 | 177 | * |
| 179 | 178 | * @return string The output. |
| 180 | 179 | */ |