@@ -95,7 +95,7 @@ |
||
95 | 95 | * @param string $icon_class_name Icon class used in vertical tabs. Supports non-dashicon. If dashicons, no need for `dashicons ` prefix |
96 | 96 | * @param string $callback Function to render the metabox, if $file is not defined. |
97 | 97 | * @param null $callback_args Arguments passed to the callback |
98 | - * @return void |
|
98 | + * @return GravityView_Metabox_Tab |
|
99 | 99 | */ |
100 | 100 | function __construct( $id, $title = '', $file = '', $icon_class_name = '', $callback = '', $callback_args = null ) { |
101 | 101 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @since 1.15 |
29 | 29 | * @param bool|false $mixed |
30 | 30 | * |
31 | - * @return bool |
|
31 | + * @return boolean|null |
|
32 | 32 | */ |
33 | 33 | private function _exit( $mixed = NULL ) { |
34 | 34 | |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * Import Gravity Form XML or JSON |
201 | 201 | * |
202 | 202 | * @param string $xml_or_json_path Path to form XML or JSON file |
203 | - * @return int|bool Imported form ID or false |
|
203 | + * @return false|string Imported form ID or false |
|
204 | 204 | */ |
205 | 205 | function import_form( $xml_or_json_path = '' ) { |
206 | 206 |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | // template areas |
138 | 138 | $template_areas_directory = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'directory' ); |
139 | - $template_areas_single = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'single' ); |
|
139 | + $template_areas_single = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'single' ); |
|
140 | 140 | |
141 | 141 | // widget areas |
142 | 142 | $default_widget_areas = GravityView_Plugin::get_default_widget_areas(); |
@@ -328,40 +328,40 @@ discard block |
||
328 | 328 | // load file |
329 | 329 | $xmlstr = file_get_contents( $form_file ); |
330 | 330 | |
331 | - $options = array( |
|
332 | - "page" => array("unserialize_as_array" => true), |
|
333 | - "form"=> array("unserialize_as_array" => true), |
|
334 | - "field"=> array("unserialize_as_array" => true), |
|
335 | - "rule"=> array("unserialize_as_array" => true), |
|
336 | - "choice"=> array("unserialize_as_array" => true), |
|
337 | - "input"=> array("unserialize_as_array" => true), |
|
338 | - "routing_item"=> array("unserialize_as_array" => true), |
|
339 | - "creditCard"=> array("unserialize_as_array" => true), |
|
340 | - "routin"=> array("unserialize_as_array" => true), |
|
341 | - "confirmation" => array("unserialize_as_array" => true), |
|
342 | - "notification" => array("unserialize_as_array" => true) |
|
343 | - ); |
|
331 | + $options = array( |
|
332 | + "page" => array("unserialize_as_array" => true), |
|
333 | + "form"=> array("unserialize_as_array" => true), |
|
334 | + "field"=> array("unserialize_as_array" => true), |
|
335 | + "rule"=> array("unserialize_as_array" => true), |
|
336 | + "choice"=> array("unserialize_as_array" => true), |
|
337 | + "input"=> array("unserialize_as_array" => true), |
|
338 | + "routing_item"=> array("unserialize_as_array" => true), |
|
339 | + "creditCard"=> array("unserialize_as_array" => true), |
|
340 | + "routin"=> array("unserialize_as_array" => true), |
|
341 | + "confirmation" => array("unserialize_as_array" => true), |
|
342 | + "notification" => array("unserialize_as_array" => true) |
|
343 | + ); |
|
344 | 344 | |
345 | 345 | $xml = new RGXML($options); |
346 | - $forms = $xml->unserialize($xmlstr); |
|
346 | + $forms = $xml->unserialize($xmlstr); |
|
347 | 347 | |
348 | - if( !$forms ) { |
|
349 | - do_action( 'gravityview_log_error', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. Error importing file. (File)', $form_file ); |
|
350 | - return false; |
|
351 | - } |
|
348 | + if( !$forms ) { |
|
349 | + do_action( 'gravityview_log_error', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. Error importing file. (File)', $form_file ); |
|
350 | + return false; |
|
351 | + } |
|
352 | 352 | |
353 | - if( !empty( $forms[0] ) && is_array( $forms[0] ) ) { |
|
354 | - $form = $forms[0]; |
|
355 | - } |
|
353 | + if( !empty( $forms[0] ) && is_array( $forms[0] ) ) { |
|
354 | + $form = $forms[0]; |
|
355 | + } |
|
356 | 356 | |
357 | - if( empty( $form ) ) { |
|
358 | - do_action( 'gravityview_log_error', '[pre_get_available_fields] $form not set.', $forms ); |
|
359 | - return false; |
|
360 | - } |
|
357 | + if( empty( $form ) ) { |
|
358 | + do_action( 'gravityview_log_error', '[pre_get_available_fields] $form not set.', $forms ); |
|
359 | + return false; |
|
360 | + } |
|
361 | 361 | |
362 | - do_action( 'gravityview_log_debug', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. (Form)', $form ); |
|
362 | + do_action( 'gravityview_log_debug', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. (Form)', $form ); |
|
363 | 363 | |
364 | - return $form; |
|
364 | + return $form; |
|
365 | 365 | |
366 | 366 | } |
367 | 367 |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | /** |
152 | 152 | * Sets the single entry ID and also the entry |
153 | - * @param bool|int $single_entry |
|
153 | + * @param boolean|string $single_entry |
|
154 | 154 | */ |
155 | 155 | public function setSingleEntry( $single_entry ) { |
156 | 156 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | |
168 | 168 | /** |
169 | 169 | * Set the current entry |
170 | - * @param array|int $entry Entry array or entry ID |
|
170 | + * @param boolean|string $entry Entry array or entry ID |
|
171 | 171 | */ |
172 | 172 | public function setEntry( $entry ) { |
173 | 173 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | * |
226 | 226 | * |
227 | 227 | * |
228 | - * @param null $view_id |
|
228 | + * @param string $view_id |
|
229 | 229 | */ |
230 | 230 | public function set_context_view_id( $view_id = null ) { |
231 | 231 | |
@@ -934,7 +934,7 @@ discard block |
||
934 | 934 | * |
935 | 935 | * @uses gravityview_get_entries() |
936 | 936 | * @access public |
937 | - * @param array $args\n |
|
937 | + * @param array $args |
|
938 | 938 | * - $id - View id |
939 | 939 | * - $page_size - Page |
940 | 940 | * - $sort_field - form field id to sort |
@@ -1364,7 +1364,7 @@ discard block |
||
1364 | 1364 | /** |
1365 | 1365 | * Checks if field (column) is sortable |
1366 | 1366 | * |
1367 | - * @param string $field Field settings |
|
1367 | + * @param string $field_id Field settings |
|
1368 | 1368 | * @param array $form Gravity Forms form array |
1369 | 1369 | * |
1370 | 1370 | * @since 1.7 |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * GravityView Frontend functions |
|
4 | - * |
|
5 | - * @package GravityView |
|
6 | - * @license GPL2+ |
|
7 | - * @author Katz Web Services, Inc. |
|
8 | - * @link http://gravityview.co |
|
9 | - * @copyright Copyright 2014, Katz Web Services, Inc. |
|
10 | - * |
|
11 | - * @since 1.0.0 |
|
12 | - */ |
|
3 | + * GravityView Frontend functions |
|
4 | + * |
|
5 | + * @package GravityView |
|
6 | + * @license GPL2+ |
|
7 | + * @author Katz Web Services, Inc. |
|
8 | + * @link http://gravityview.co |
|
9 | + * @copyright Copyright 2014, Katz Web Services, Inc. |
|
10 | + * |
|
11 | + * @since 1.0.0 |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | |
15 | 15 | class GravityView_frontend { |
@@ -195,7 +195,7 @@ |
||
195 | 195 | * |
196 | 196 | * @since 1.6 |
197 | 197 | * |
198 | - * @param int $new_view_id The ID of the newly created View |
|
198 | + * @param int $new_id The ID of the newly created View |
|
199 | 199 | * @param WP_Post $post The View that was just cloned |
200 | 200 | * |
201 | 201 | * @return void |
@@ -116,7 +116,7 @@ |
||
116 | 116 | |
117 | 117 | /** |
118 | 118 | * @since 1.12 |
119 | - * @return bool |
|
119 | + * @return boolean|null |
|
120 | 120 | */ |
121 | 121 | private function add_fallback_shortcode() { |
122 | 122 |
@@ -204,7 +204,7 @@ |
||
204 | 204 | self::$notices['wp_version'] = array( |
205 | 205 | 'class' => 'error', |
206 | 206 | 'message' => sprintf( __( "%sGravityView requires WordPress %s or newer.%s \n\nYou're using Version %s. Please upgrade your WordPress installation.", 'gravityview' ), '<h3>', GV_MIN_WP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">'.$wp_version.'</span>' ), |
207 | - 'cap' => 'update_core', |
|
207 | + 'cap' => 'update_core', |
|
208 | 208 | 'dismiss' => 'wp_version', |
209 | 209 | ); |
210 | 210 |
@@ -221,7 +221,6 @@ discard block |
||
221 | 221 | * |
222 | 222 | * @since 1.15 |
223 | 223 | * |
224 | - * @param string|null $content Content inside shortcode, if defined |
|
225 | 224 | * |
226 | 225 | * @return string|boolean If URL is fetched, the URL to the entry link. If not found, returns false. |
227 | 226 | */ |
@@ -316,7 +315,7 @@ discard block |
||
316 | 315 | * |
317 | 316 | * @since 1.15 |
318 | 317 | * |
319 | - * @param string $href URL |
|
318 | + * @param string|null $url |
|
320 | 319 | */ |
321 | 320 | private function maybe_add_field_values_query_args( $url ) { |
322 | 321 |
@@ -278,7 +278,7 @@ |
||
278 | 278 | |
279 | 279 | /** |
280 | 280 | * Add a notice to be displayed in the admin. |
281 | - * @param array $notice Array with `class` and `message` keys. The message is not escaped. |
|
281 | + * @param string $notice Array with `class` and `message` keys. The message is not escaped. |
|
282 | 282 | */ |
283 | 283 | public static function add_notice( $notice = array() ) { |
284 | 284 |
@@ -244,13 +244,13 @@ |
||
244 | 244 | $this->_remote_update_url, |
245 | 245 | $this->_path, |
246 | 246 | array( |
247 | - 'version' => $this->_version, // current version number |
|
248 | - 'license' => $license['license'], |
|
249 | - 'item_id' => $this->_item_id, // The ID of the download on _remote_update_url |
|
250 | - 'item_name' => $this->_title, // name of this plugin |
|
251 | - 'author' => strip_tags( $this->_author ) // author of this plugin |
|
252 | - ) |
|
253 | - ); |
|
247 | + 'version' => $this->_version, // current version number |
|
248 | + 'license' => $license['license'], |
|
249 | + 'item_id' => $this->_item_id, // The ID of the download on _remote_update_url |
|
250 | + 'item_name' => $this->_title, // name of this plugin |
|
251 | + 'author' => strip_tags( $this->_author ) // author of this plugin |
|
252 | + ) |
|
253 | + ); |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | /** |
@@ -135,7 +135,7 @@ |
||
135 | 135 | * @param bool $url_encode Whether to URL-encode output |
136 | 136 | * @param bool $esc_html Whether to apply `esc_html()` to output |
137 | 137 | * |
138 | - * @return mixed |
|
138 | + * @return string |
|
139 | 139 | */ |
140 | 140 | public static function replace_gv_merge_tags( $text, $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) { |
141 | 141 |
@@ -122,7 +122,7 @@ |
||
122 | 122 | |
123 | 123 | $atts = array( |
124 | 124 | 'format' => self::get_format_from_modifiers( $exploded, false ), |
125 | - 'human' => in_array( 'human', $exploded ), // {date_created:human} |
|
125 | + 'human' => in_array( 'human', $exploded ), // {date_created:human} |
|
126 | 126 | 'diff' => in_array( 'diff', $exploded ), // {date_created:diff} |
127 | 127 | 'raw' => in_array( 'raw', $exploded ), // {date_created:raw} |
128 | 128 | 'timestamp' => in_array( 'timestamp', $exploded ), // {date_created:timestamp} |
@@ -67,7 +67,6 @@ |
||
67 | 67 | * |
68 | 68 | * @since 1.15 |
69 | 69 | * |
70 | - * @param array $allcaps An array of all the user's capabilities. |
|
71 | 70 | * @param array $caps Actual capabilities for meta capability. |
72 | 71 | * @param array $args Optional parameters passed to has_cap(), typically object ID. |
73 | 72 | * @param WP_User|null $user The user object, in WordPress 3.7.0 or higher |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | add_filter( 'members_get_capabilities', array( 'GravityView_Roles_Capabilities', 'merge_with_all_caps' ) ); |
57 | 57 | add_action( 'members_register_cap_groups', array( $this, 'members_register_cap_group' ), 20 ); |
58 | 58 | add_filter( 'user_has_cap', array( $this, 'filter_user_has_cap' ), 10, 4 ); |
59 | - add_action( 'admin_init', array( $this, 'add_caps') ); |
|
59 | + add_action( 'admin_init', array( $this, 'add_caps') ); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | |
@@ -360,7 +360,6 @@ discard block |
||
360 | 360 | * Add Gravity Forms and GravityView's "full access" caps when any other caps are checked against. |
361 | 361 | * |
362 | 362 | * @since 1.15 |
363 | - |
|
364 | 363 | * @param array $caps_to_check |
365 | 364 | * |
366 | 365 | * @return array |