@@ -2,8 +2,9 @@ discard block |
||
2 | 2 | namespace GV; |
3 | 3 | |
4 | 4 | /** If this file is called directly, abort. */ |
5 | -if ( ! defined( 'GRAVITYVIEW_DIR' ) ) |
|
5 | +if ( ! defined( 'GRAVITYVIEW_DIR' ) ) { |
|
6 | 6 | die(); |
7 | +} |
|
7 | 8 | |
8 | 9 | /** |
9 | 10 | * The base Entry class. |
@@ -24,8 +25,9 @@ discard block |
||
24 | 25 | $endpoint = self::get_endpoint_name(); |
25 | 26 | |
26 | 27 | /** Let's make sure the endpoint array is not polluted. */ |
27 | - if ( in_array( array( EP_ALL, $endpoint, $endpoint ), $wp_rewrite->endpoints ) ) |
|
28 | - return; |
|
28 | + if ( in_array( array( EP_ALL, $endpoint, $endpoint ), $wp_rewrite->endpoints ) ) { |
|
29 | + return; |
|
30 | + } |
|
29 | 31 | |
30 | 32 | add_rewrite_endpoint( $endpoint, EP_ALL ); |
31 | 33 | } |
@@ -2,8 +2,9 @@ discard block |
||
2 | 2 | namespace GV; |
3 | 3 | |
4 | 4 | /** If this file is called directly, abort. */ |
5 | -if ( ! defined( 'GRAVITYVIEW_DIR' ) ) |
|
5 | +if ( ! defined( 'GRAVITYVIEW_DIR' ) ) { |
|
6 | 6 | die(); |
7 | +} |
|
7 | 8 | |
8 | 9 | /** |
9 | 10 | * The default GravityView View class. |
@@ -21,8 +22,9 @@ discard block |
||
21 | 22 | public static function register_post_type() { |
22 | 23 | |
23 | 24 | /** Register only once */ |
24 | - if ( post_type_exists( 'gravityview' ) ) |
|
25 | - return; |
|
25 | + if ( post_type_exists( 'gravityview' ) ) { |
|
26 | + return; |
|
27 | + } |
|
26 | 28 | |
27 | 29 | /** |
28 | 30 | * @filter `gravityview_is_hierarchical` Make GravityView Views hierarchical by returning TRUE |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | /** |
155 | 155 | * Sets the single entry ID and also the entry |
156 | - * @param bool|int|string $single_entry |
|
156 | + * @param boolean|string $single_entry |
|
157 | 157 | */ |
158 | 158 | public function setSingleEntry( $single_entry ) { |
159 | 159 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | /** |
172 | 172 | * Set the current entry |
173 | - * @param array|int $entry Entry array or entry slug or ID |
|
173 | + * @param boolean|string $entry Entry array or entry slug or ID |
|
174 | 174 | */ |
175 | 175 | public function setEntry( $entry ) { |
176 | 176 | |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | * |
229 | 229 | * |
230 | 230 | * |
231 | - * @param null $view_id |
|
231 | + * @param string $view_id |
|
232 | 232 | */ |
233 | 233 | public function set_context_view_id( $view_id = null ) { |
234 | 234 | |
@@ -1105,7 +1105,7 @@ discard block |
||
1105 | 1105 | * |
1106 | 1106 | * @uses gravityview_get_entries() |
1107 | 1107 | * @access public |
1108 | - * @param array $args\n |
|
1108 | + * @param array $args |
|
1109 | 1109 | * - $id - View id |
1110 | 1110 | * - $page_size - Page |
1111 | 1111 | * - $sort_field - form field id to sort |
@@ -1193,7 +1193,6 @@ discard block |
||
1193 | 1193 | * @since 1.19.5 |
1194 | 1194 | * |
1195 | 1195 | * @param $args |
1196 | - * @param int $form_id |
|
1197 | 1196 | */ |
1198 | 1197 | public static function get_search_criteria_paging( $args ) { |
1199 | 1198 | |
@@ -1588,7 +1587,7 @@ discard block |
||
1588 | 1587 | /** |
1589 | 1588 | * Checks if field (column) is sortable |
1590 | 1589 | * |
1591 | - * @param string $field Field settings |
|
1590 | + * @param string $field_id Field settings |
|
1592 | 1591 | * @param array $form Gravity Forms form array |
1593 | 1592 | * |
1594 | 1593 | * @since 1.7 |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | */ |
245 | 245 | $this->context_view_id = $_GET['gvid']; |
246 | 246 | |
247 | - } elseif ( ! $this->getGvOutputData()->has_multiple_views() ) { |
|
247 | + } elseif ( ! $this->getGvOutputData()->has_multiple_views() ) { |
|
248 | 248 | $array_keys = array_keys( $this->getGvOutputData()->get_views() ); |
249 | 249 | $this->context_view_id = array_pop( $array_keys ); |
250 | 250 | unset( $array_keys ); |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | } |
453 | 453 | |
454 | 454 | // User reported WooCommerce doesn't pass two args. |
455 | - if ( empty( $passed_post_id ) ) { |
|
455 | + if ( empty( $passed_post_id ) ) { |
|
456 | 456 | return $title; |
457 | 457 | } |
458 | 458 | |
@@ -1307,7 +1307,7 @@ discard block |
||
1307 | 1307 | */ |
1308 | 1308 | $address_part = apply_filters( 'gravityview/sorting/address', 'city', $sort_field_id, $form_id ); |
1309 | 1309 | |
1310 | - switch( strtolower( $address_part ) ){ |
|
1310 | + switch( strtolower( $address_part ) ) { |
|
1311 | 1311 | case 'street': |
1312 | 1312 | $sort_field_id .= '.1'; |
1313 | 1313 | break; |
@@ -1392,7 +1392,7 @@ discard block |
||
1392 | 1392 | */ |
1393 | 1393 | $single_entry = apply_filters( 'gravityview/is_single_entry', $single_entry ); |
1394 | 1394 | |
1395 | - if ( empty( $single_entry ) ){ |
|
1395 | + if ( empty( $single_entry ) ) { |
|
1396 | 1396 | return false; |
1397 | 1397 | } else { |
1398 | 1398 | return $single_entry; |
@@ -2,8 +2,9 @@ |
||
2 | 2 | namespace GV; |
3 | 3 | |
4 | 4 | /** If this file is called directly, abort. */ |
5 | -if ( ! defined( 'GRAVITYVIEW_DIR' ) ) |
|
5 | +if ( ! defined( 'GRAVITYVIEW_DIR' ) ) { |
|
6 | 6 | die(); |
7 | +} |
|
7 | 8 | |
8 | 9 | /** |
9 | 10 | * The Request abstract class. |
@@ -2,8 +2,9 @@ |
||
2 | 2 | namespace GV; |
3 | 3 | |
4 | 4 | /** If this file is called directly, abort. */ |
5 | -if ( ! defined( 'GRAVITYVIEW_DIR' ) ) |
|
5 | +if ( ! defined( 'GRAVITYVIEW_DIR' ) ) { |
|
6 | 6 | die(); |
7 | +} |
|
7 | 8 | |
8 | 9 | /** |
9 | 10 | * The base \GV\Shortcode class. |
@@ -2,8 +2,9 @@ |
||
2 | 2 | namespace GV\Shortcodes; |
3 | 3 | |
4 | 4 | /** If this file is called directly, abort. */ |
5 | -if ( ! defined( 'GRAVITYVIEW_DIR' ) ) |
|
5 | +if ( ! defined( 'GRAVITYVIEW_DIR' ) ) { |
|
6 | 6 | die(); |
7 | +} |
|
7 | 8 | |
8 | 9 | /** |
9 | 10 | * The base \GV\Shortcode class. |
@@ -312,8 +312,9 @@ discard block |
||
312 | 312 | */ |
313 | 313 | public static function is_admin() { |
314 | 314 | |
315 | - if ( function_exists( 'gravityview' ) ) |
|
316 | - return gravityview()->request->is_admin(); |
|
315 | + if ( function_exists( 'gravityview' ) ) { |
|
316 | + return gravityview()->request->is_admin(); |
|
317 | + } |
|
317 | 318 | |
318 | 319 | $doing_ajax = defined( 'DOING_AJAX' ) ? DOING_AJAX : false; |
319 | 320 | |
@@ -382,7 +383,7 @@ discard block |
||
382 | 383 | * @param mixed $data Additional data to display |
383 | 384 | * @return void |
384 | 385 | */ |
385 | - public static function log_debug( $message, $data = null ){ |
|
386 | + public static function log_debug( $message, $data = null ) { |
|
386 | 387 | /** |
387 | 388 | * @action `gravityview_log_debug` Log a debug message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output |
388 | 389 | * @param string $message Message to display |
@@ -396,7 +397,7 @@ discard block |
||
396 | 397 | * @param string $message log message |
397 | 398 | * @return void |
398 | 399 | */ |
399 | - public static function log_error( $message, $data = null ){ |
|
400 | + public static function log_error( $message, $data = null ) { |
|
400 | 401 | /** |
401 | 402 | * @action `gravityview_log_error` Log an error message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output |
402 | 403 | * @param string $message Error message to display |
@@ -232,7 +232,7 @@ |
||
232 | 232 | * Does the if and the comparison match? |
233 | 233 | * @uses GVCommon::matches_operation |
234 | 234 | * |
235 | - * @return boolean True: yep; false: nope |
|
235 | + * @return boolean|null True: yep; false: nope |
|
236 | 236 | */ |
237 | 237 | private function set_is_match() { |
238 | 238 | $this->is_match = GVCommon::matches_operation( $this->if, $this->comparison, $this->operation ); |
@@ -245,7 +245,7 @@ |
||
245 | 245 | * @param bool $url_encode Whether to URL-encode output |
246 | 246 | * @param bool $esc_html Whether to apply `esc_html()` to output |
247 | 247 | * |
248 | - * @return mixed |
|
248 | + * @return string |
|
249 | 249 | */ |
250 | 250 | public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) { |
251 | 251 |