@@ -432,23 +432,17 @@ |
||
| 432 | 432 | do_action( 'gravityview_log_error', __METHOD__ . ' entry_id or form_id are empty.', $_POST ); |
| 433 | 433 | |
| 434 | 434 | $result = false; |
| 435 | - } |
|
| 436 | - |
|
| 437 | - else if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'gravityview_ajaxgfentries' ) ) { |
|
| 435 | + } else if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'gravityview_ajaxgfentries' ) ) { |
|
| 438 | 436 | |
| 439 | 437 | do_action( 'gravityview_log_error', __METHOD__ . ' Security check failed.', $_POST ); |
| 440 | 438 | |
| 441 | 439 | $result = false; |
| 442 | - } |
|
| 443 | - |
|
| 444 | - else if( ! GVCommon::has_cap( 'gravityview_moderate_entries', $_POST['entry_id'] ) ) { |
|
| 440 | + } else if( ! GVCommon::has_cap( 'gravityview_moderate_entries', $_POST['entry_id'] ) ) { |
|
| 445 | 441 | |
| 446 | 442 | do_action( 'gravityview_log_error', __METHOD__ . ' User does not have the `gravityview_moderate_entries` capability.' ); |
| 447 | 443 | |
| 448 | 444 | $result = false; |
| 449 | - } |
|
| 450 | - |
|
| 451 | - else { |
|
| 445 | + } else { |
|
| 452 | 446 | |
| 453 | 447 | $result = self::update_approved( $_POST['entry_id'], $_POST['approved'], $_POST['form_id'] ); |
| 454 | 448 | |
@@ -214,7 +214,6 @@ discard block |
||
| 214 | 214 | * |
| 215 | 215 | * @access public |
| 216 | 216 | * @param array $entry |
| 217 | - * @param array $field |
|
| 218 | 217 | * @return null|string |
| 219 | 218 | */ |
| 220 | 219 | public static function field_value( $entry, $field_settings, $format = 'html' ) { |
@@ -1000,7 +999,7 @@ discard block |
||
| 1000 | 999 | * Get the current View ID being rendered |
| 1001 | 1000 | * |
| 1002 | 1001 | * @global GravityView_View $gravityview_view |
| 1003 | - * @return string View context "directory" or "single" |
|
| 1002 | + * @return integer View context "directory" or "single" |
|
| 1004 | 1003 | */ |
| 1005 | 1004 | function gravityview_get_view_id() { |
| 1006 | 1005 | return GravityView_View::getInstance()->getViewId(); |
@@ -873,7 +873,7 @@ discard block |
||
| 873 | 873 | /** |
| 874 | 874 | * Get the label for a search form field |
| 875 | 875 | * @param array $field Field setting as sent by the GV configuration - has `field`, `input` (input type), and `label` keys |
| 876 | - * @param array $form_field Form field data, as fetched by `gravityview_get_field()` |
|
| 876 | + * @param GF_Field|null $form_field Form field data, as fetched by `gravityview_get_field()` |
|
| 877 | 877 | * @return string Label for the search form |
| 878 | 878 | */ |
| 879 | 879 | private static function get_field_label( $field, $form_field = array() ) { |
@@ -1053,7 +1053,7 @@ discard block |
||
| 1053 | 1053 | /** |
| 1054 | 1054 | * Modify the array passed to wp_localize_script() |
| 1055 | 1055 | * |
| 1056 | - * @param array $js_localization The data padded to the Javascript file |
|
| 1056 | + * @param array $localizations The data padded to the Javascript file |
|
| 1057 | 1057 | * @param array $view_data View data array with View settings |
| 1058 | 1058 | * |
| 1059 | 1059 | * @return array |