@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $action_text = sprintf( esc_html__( 'Add fields to %s', 'gravityview' ), $tab ); |
| 62 | 62 | $message = esc_html__( 'You can only see this message because you are able to edit this View.', 'gravityview' ); |
| 63 | 63 | |
| 64 | - $image = sprintf( '<img alt="%s" src="%s" style="margin-top: 10px;" />', $tab, esc_url( plugins_url( sprintf( 'assets/images/tab-%s.png', $context ), GRAVITYVIEW_FILE ) ) ); |
|
| 64 | + $image = sprintf( '<img alt="%s" src="%s" style="margin-top: 10px;" />', $tab, esc_url( plugins_url( sprintf( 'assets/images/tab-%s.png', $context ), GRAVITYVIEW_FILE ) ) ); |
|
| 65 | 65 | $output = sprintf( '<h3>%s <strong><a href="%s">%s</a></strong></h3><p>%s</p>', $title, esc_url( $edit_link ), $action_text, $message ); |
| 66 | 66 | |
| 67 | 67 | echo \GVCommon::generate_notice( $output . $image, 'gv-error error', 'edit_gravityview', $gravityview->view->ID ); |
@@ -138,20 +138,20 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
| 141 | - * Uninstall all traces of GravityView |
|
| 142 | - * |
|
| 143 | - * Note: method is public because parent method is public |
|
| 144 | - * |
|
| 141 | + * Uninstall all traces of GravityView |
|
| 142 | + * |
|
| 143 | + * Note: method is public because parent method is public |
|
| 144 | + * |
|
| 145 | 145 | * @return bool |
| 146 | 146 | */ |
| 147 | 147 | public function uninstall() { |
| 148 | 148 | gravityview()->plugin->uninstall(); |
| 149 | 149 | |
| 150 | 150 | /** |
| 151 | - * Set the path so that Gravity Forms can de-activate GravityView |
|
| 152 | - * @see GFAddOn::uninstall_addon |
|
| 153 | - * @uses deactivate_plugins() |
|
| 154 | - */ |
|
| 151 | + * Set the path so that Gravity Forms can de-activate GravityView |
|
| 152 | + * @see GFAddOn::uninstall_addon |
|
| 153 | + * @uses deactivate_plugins() |
|
| 154 | + */ |
|
| 155 | 155 | $this->_path = GRAVITYVIEW_FILE; |
| 156 | 156 | |
| 157 | 157 | return true; |
@@ -181,42 +181,42 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | /** |
| 184 | - * Get an array of reasons why the plugin might be uninstalled |
|
| 185 | - * |
|
| 186 | - * @since 1.17.5 |
|
| 187 | - * |
|
| 184 | + * Get an array of reasons why the plugin might be uninstalled |
|
| 185 | + * |
|
| 186 | + * @since 1.17.5 |
|
| 187 | + * |
|
| 188 | 188 | * @return array Array of reasons with the label and followup questions for each uninstall reason |
| 189 | 189 | */ |
| 190 | 190 | private function get_uninstall_reasons() { |
| 191 | 191 | $reasons = array( |
| 192 | 192 | 'will-continue' => array( |
| 193 | - 'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ), |
|
| 194 | - ), |
|
| 193 | + 'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ), |
|
| 194 | + ), |
|
| 195 | 195 | 'no-longer-need' => array( |
| 196 | - 'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ), |
|
| 197 | - ), |
|
| 196 | + 'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ), |
|
| 197 | + ), |
|
| 198 | 198 | 'doesnt-work' => array( |
| 199 | - 'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ), |
|
| 200 | - ), |
|
| 199 | + 'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ), |
|
| 200 | + ), |
|
| 201 | 201 | 'found-other' => array( |
| 202 | - 'label' => esc_html__( 'I found a better plugin', 'gravityview' ), |
|
| 203 | - 'followup' => esc_attr__( 'What plugin you are using, and why?', 'gravityview' ), |
|
| 204 | - ), |
|
| 202 | + 'label' => esc_html__( 'I found a better plugin', 'gravityview' ), |
|
| 203 | + 'followup' => esc_attr__( 'What plugin you are using, and why?', 'gravityview' ), |
|
| 204 | + ), |
|
| 205 | 205 | 'other' => array( |
| 206 | - 'label' => esc_html__( 'Other', 'gravityview' ), |
|
| 207 | - ), |
|
| 206 | + 'label' => esc_html__( 'Other', 'gravityview' ), |
|
| 207 | + ), |
|
| 208 | 208 | ); |
| 209 | 209 | |
| 210 | 210 | shuffle( $reasons ); |
| 211 | 211 | |
| 212 | 212 | return $reasons; |
| 213 | - } |
|
| 213 | + } |
|
| 214 | 214 | |
| 215 | 215 | /** |
| 216 | - * Display a feedback form when the plugin is uninstalled |
|
| 217 | - * |
|
| 218 | - * @since 1.17.5 |
|
| 219 | - * |
|
| 216 | + * Display a feedback form when the plugin is uninstalled |
|
| 217 | + * |
|
| 218 | + * @since 1.17.5 |
|
| 219 | + * |
|
| 220 | 220 | * @return string HTML of the uninstallation form |
| 221 | 221 | */ |
| 222 | 222 | public function uninstall_form() { |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | <h2><?php esc_html_e( 'Why did you uninstall GravityView?', 'gravityview' ); ?></h2> |
| 297 | 297 | <ul> |
| 298 | 298 | <?php |
| 299 | - $reasons = $this->get_uninstall_reasons(); |
|
| 299 | + $reasons = $this->get_uninstall_reasons(); |
|
| 300 | 300 | foreach ( $reasons as $reason ) { |
| 301 | 301 | printf( '<li><label><input name="reason" type="radio" value="other" data-followup="%s"> %s</label></li>', Utils::get( $reason, 'followup' ), Utils::get( $reason, 'label' ) ); |
| 302 | 302 | } |
@@ -390,12 +390,12 @@ discard block |
||
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | public function app_settings_tab() { |
| 393 | - parent::app_settings_tab(); |
|
| 393 | + parent::app_settings_tab(); |
|
| 394 | 394 | |
| 395 | 395 | if ( $this->maybe_uninstall() ) { |
| 396 | - echo $this->uninstall_form(); |
|
| 396 | + echo $this->uninstall_form(); |
|
| 397 | 397 | } |
| 398 | - } |
|
| 398 | + } |
|
| 399 | 399 | |
| 400 | 400 | /** |
| 401 | 401 | * The Settings title |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | * @return array The settings. |
| 481 | 481 | */ |
| 482 | 482 | public function all() { |
| 483 | - return wp_parse_args( get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', array() ), $this->defaults() ); |
|
| 483 | + return wp_parse_args( get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', array() ), $this->defaults() ); |
|
| 484 | 484 | } |
| 485 | 485 | |
| 486 | 486 | /** |
@@ -549,8 +549,8 @@ discard block |
||
| 549 | 549 | type="' . $field['type'] . '" |
| 550 | 550 | name="' . esc_attr( $name ) . '" |
| 551 | 551 | value="' . $value . '" ' . |
| 552 | - implode( ' ', $attributes ) . |
|
| 553 | - ' />'; |
|
| 552 | + implode( ' ', $attributes ) . |
|
| 553 | + ' />'; |
|
| 554 | 554 | |
| 555 | 555 | if ( $echo ) { |
| 556 | 556 | echo $html; |
@@ -577,7 +577,7 @@ discard block |
||
| 577 | 577 | $license_key = $this->get( 'license_key' ); |
| 578 | 578 | if( '' === $license_key ) { |
| 579 | 579 | $license_status = 'inactive'; |
| 580 | - } |
|
| 580 | + } |
|
| 581 | 581 | $license_id = empty( $license_key ) ? 'license' : $license_key; |
| 582 | 582 | |
| 583 | 583 | $message = esc_html__( 'Your GravityView license %s. This means you’re missing out on updates and support! %sActivate your license%s or %sget a license here%s.', 'gravityview' ); |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | $update_below = false; |
| 593 | 593 | $primary_button_link = admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ); |
| 594 | 594 | |
| 595 | - switch ( $license_status ) { |
|
| 595 | + switch ( $license_status ) { |
|
| 596 | 596 | /** @since 1.17 */ |
| 597 | 597 | case 'expired': |
| 598 | 598 | $title = __( 'Expired License', 'gravityview' ); |
@@ -648,12 +648,12 @@ discard block |
||
| 648 | 648 | } |
| 649 | 649 | |
| 650 | 650 | /** |
| 651 | - * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
| 652 | - * |
|
| 653 | - * @since 1.21.5 |
|
| 654 | - * |
|
| 655 | - * @see GFAddOn::scripts() |
|
| 656 | - * |
|
| 651 | + * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
| 652 | + * |
|
| 653 | + * @since 1.21.5 |
|
| 654 | + * |
|
| 655 | + * @see GFAddOn::scripts() |
|
| 656 | + * |
|
| 657 | 657 | * @return array Array of scripts |
| 658 | 658 | */ |
| 659 | 659 | public function scripts() { |
@@ -662,10 +662,10 @@ discard block |
||
| 662 | 662 | $scripts[] = array( |
| 663 | 663 | 'handle' => 'gform_tooltip_init', |
| 664 | 664 | 'enqueue' => array( |
| 665 | - array( |
|
| 666 | - 'admin_page' => array( 'app_settings' ) |
|
| 667 | - ) |
|
| 668 | - ) |
|
| 665 | + array( |
|
| 666 | + 'admin_page' => array( 'app_settings' ) |
|
| 667 | + ) |
|
| 668 | + ) |
|
| 669 | 669 | ); |
| 670 | 670 | |
| 671 | 671 | return $scripts; |
@@ -683,10 +683,10 @@ discard block |
||
| 683 | 683 | 'src' => plugins_url( 'assets/css/admin-settings.css', GRAVITYVIEW_FILE ), |
| 684 | 684 | 'version' => Plugin::$version, |
| 685 | 685 | 'deps' => array( |
| 686 | - 'gform_admin', |
|
| 686 | + 'gform_admin', |
|
| 687 | 687 | 'gaddon_form_settings_css', |
| 688 | - 'gform_tooltip', |
|
| 689 | - 'gform_font_awesome', |
|
| 688 | + 'gform_tooltip', |
|
| 689 | + 'gform_font_awesome', |
|
| 690 | 690 | ), |
| 691 | 691 | 'enqueue' => array( |
| 692 | 692 | array( 'admin_page' => array( |
@@ -849,7 +849,7 @@ discard block |
||
| 849 | 849 | array( |
| 850 | 850 | 'label' => _x( 'Show me beta versions if they are available.', 'gravityview' ), |
| 851 | 851 | 'value' => '1', |
| 852 | - 'name' => 'beta', |
|
| 852 | + 'name' => 'beta', |
|
| 853 | 853 | ), |
| 854 | 854 | ), |
| 855 | 855 | 'description' => __( 'You will have early access to the latest GravityView features and improvements. There may be bugs! If you encounter an issue, help make GravityView better by reporting it!', 'gravityview' ), |
@@ -887,38 +887,38 @@ discard block |
||
| 887 | 887 | |
| 888 | 888 | if ( empty( $field['disabled'] ) ) { |
| 889 | 889 | unset( $field['disabled'] ); |
| 890 | - } |
|
| 890 | + } |
|
| 891 | 891 | } |
| 892 | 892 | |
| 893 | - $sections = array( |
|
| 894 | - array( |
|
| 895 | - 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __( 'You are running GravityView version %s', 'gravityview' ), Plugin::$version ) ), |
|
| 896 | - 'fields' => $fields, |
|
| 897 | - ) |
|
| 898 | - ); |
|
| 893 | + $sections = array( |
|
| 894 | + array( |
|
| 895 | + 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __( 'You are running GravityView version %s', 'gravityview' ), Plugin::$version ) ), |
|
| 896 | + 'fields' => $fields, |
|
| 897 | + ) |
|
| 898 | + ); |
|
| 899 | 899 | |
| 900 | - // custom 'update settings' button |
|
| 901 | - $button = array( |
|
| 902 | - 'class' => 'button button-primary button-hero', |
|
| 903 | - 'type' => 'save', |
|
| 904 | - ); |
|
| 900 | + // custom 'update settings' button |
|
| 901 | + $button = array( |
|
| 902 | + 'class' => 'button button-primary button-hero', |
|
| 903 | + 'type' => 'save', |
|
| 904 | + ); |
|
| 905 | 905 | |
| 906 | 906 | if ( $disabled_attribute ) { |
| 907 | 907 | $button['disabled'] = $disabled_attribute; |
| 908 | 908 | } |
| 909 | 909 | |
| 910 | - /** |
|
| 911 | - * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
| 912 | - * Extensions can tap in here to insert their own section and settings. |
|
| 913 | - * <code> |
|
| 914 | - * $sections[] = array( |
|
| 915 | - * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
| 916 | - * 'fields' => $settings, |
|
| 917 | - * ); |
|
| 918 | - * </code> |
|
| 919 | - * @param array $extension_settings Empty array, ready for extension settings! |
|
| 920 | - */ |
|
| 921 | - $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
| 910 | + /** |
|
| 911 | + * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
| 912 | + * Extensions can tap in here to insert their own section and settings. |
|
| 913 | + * <code> |
|
| 914 | + * $sections[] = array( |
|
| 915 | + * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
| 916 | + * 'fields' => $settings, |
|
| 917 | + * ); |
|
| 918 | + * </code> |
|
| 919 | + * @param array $extension_settings Empty array, ready for extension settings! |
|
| 920 | + */ |
|
| 921 | + $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
| 922 | 922 | |
| 923 | 923 | // If there are extensions, add a section for them |
| 924 | 924 | if ( ! empty( $extension_sections ) ) { |
@@ -931,13 +931,13 @@ discard block |
||
| 931 | 931 | } |
| 932 | 932 | } |
| 933 | 933 | |
| 934 | - $k = count( $extension_sections ) - 1 ; |
|
| 935 | - $extension_sections[ $k ]['fields'][] = $button; |
|
| 934 | + $k = count( $extension_sections ) - 1 ; |
|
| 935 | + $extension_sections[ $k ]['fields'][] = $button; |
|
| 936 | 936 | $sections = array_merge( $sections, $extension_sections ); |
| 937 | 937 | } else { |
| 938 | - // add the 'update settings' button to the general section |
|
| 939 | - $sections[0]['fields'][] = $button; |
|
| 940 | - } |
|
| 938 | + // add the 'update settings' button to the general section |
|
| 939 | + $sections[0]['fields'][] = $button; |
|
| 940 | + } |
|
| 941 | 941 | |
| 942 | 942 | return $sections; |
| 943 | 943 | } |
@@ -991,9 +991,9 @@ discard block |
||
| 991 | 991 | */ |
| 992 | 992 | protected function settings_edd_license( $field, $echo = true ) { |
| 993 | 993 | |
| 994 | - if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
|
| 995 | - $field['input_type'] = 'password'; |
|
| 996 | - } |
|
| 994 | + if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
|
| 995 | + $field['input_type'] = 'password'; |
|
| 996 | + } |
|
| 997 | 997 | |
| 998 | 998 | $text = $this->settings_text( $field, false ); |
| 999 | 999 | |
@@ -1036,19 +1036,19 @@ discard block |
||
| 1036 | 1036 | } |
| 1037 | 1037 | |
| 1038 | 1038 | /** |
| 1039 | - * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it |
|
| 1040 | - * |
|
| 1041 | - * Converts `$field['description']` to `$field['gv_description']` |
|
| 1042 | - * Converts `$field['subtitle']` to `$field['description']` |
|
| 1043 | - * |
|
| 1044 | - * @see \GV\Addon_Settings::single_setting_label Converts `gv_description` back to `description` |
|
| 1045 | - * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description |
|
| 1046 | - * |
|
| 1047 | - * @since 1.21.5.2 |
|
| 1048 | - * |
|
| 1039 | + * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it |
|
| 1040 | + * |
|
| 1041 | + * Converts `$field['description']` to `$field['gv_description']` |
|
| 1042 | + * Converts `$field['subtitle']` to `$field['description']` |
|
| 1043 | + * |
|
| 1044 | + * @see \GV\Addon_Settings::single_setting_label Converts `gv_description` back to `description` |
|
| 1045 | + * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description |
|
| 1046 | + * |
|
| 1047 | + * @since 1.21.5.2 |
|
| 1048 | + * |
|
| 1049 | 1049 | * @param array $field |
| 1050 | - * |
|
| 1051 | - * @return void |
|
| 1050 | + * |
|
| 1051 | + * @return void |
|
| 1052 | 1052 | */ |
| 1053 | 1053 | public function single_setting_row( $field ) { |
| 1054 | 1054 | $field['gv_description'] = Utils::get( $field, 'description' ); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | * @return array |
| 102 | 102 | */ |
| 103 | 103 | public function modify_app_settings_menu_title( $setting_tabs ) { |
| 104 | - $setting_tabs[0]['label'] = __( 'GravityView Settings', 'gravityview' ); |
|
| 104 | + $setting_tabs[ 0 ][ 'label' ] = __( 'GravityView Settings', 'gravityview' ); |
|
| 105 | 105 | return $setting_tabs; |
| 106 | 106 | } |
| 107 | 107 | |
@@ -304,15 +304,15 @@ discard block |
||
| 304 | 304 | </ul> |
| 305 | 305 | <div class="gv-followup widefat"> |
| 306 | 306 | <p><strong><label for="gv-reason-details"><?php esc_html_e( 'Comments', 'gravityview' ); ?></label></strong></p> |
| 307 | - <textarea id="gv-reason-details" name="reason_details" data-default="<?php esc_attr_e('Please share your thoughts about GravityView', 'gravityview') ?>" placeholder="<?php esc_attr_e('Please share your thoughts about GravityView', 'gravityview'); ?>" class="large-text"></textarea> |
|
| 307 | + <textarea id="gv-reason-details" name="reason_details" data-default="<?php esc_attr_e( 'Please share your thoughts about GravityView', 'gravityview' ) ?>" placeholder="<?php esc_attr_e( 'Please share your thoughts about GravityView', 'gravityview' ); ?>" class="large-text"></textarea> |
|
| 308 | 308 | </div> |
| 309 | 309 | <div class="scale-description"> |
| 310 | 310 | <p><strong><?php esc_html_e( 'How likely are you to recommend GravityView?', 'gravityview' ); ?></strong></p> |
| 311 | 311 | <ul class="inline"> |
| 312 | 312 | <?php |
| 313 | 313 | $i = 0; |
| 314 | - while( $i < 11 ) { |
|
| 315 | - echo '<li class="inline number-scale"><label><input name="likely_to_refer" id="likely_to_refer_'.$i.'" value="'.$i.'" type="radio"> '.$i.'</label></li>'; |
|
| 314 | + while ( $i < 11 ) { |
|
| 315 | + echo '<li class="inline number-scale"><label><input name="likely_to_refer" id="likely_to_refer_' . $i . '" value="' . $i . '" type="radio"> ' . $i . '</label></li>'; |
|
| 316 | 316 | $i++; |
| 317 | 317 | } |
| 318 | 318 | ?> |
@@ -529,15 +529,15 @@ discard block |
||
| 529 | 529 | * @return string The HTML |
| 530 | 530 | */ |
| 531 | 531 | public function as_html( $field, $echo = true ) { |
| 532 | - $field['type'] = ( isset( $field['type'] ) && in_array( $field['type'], array( 'submit','reset','button' ) ) ) ? $field['type'] : 'submit'; |
|
| 532 | + $field[ 'type' ] = ( isset( $field[ 'type' ] ) && in_array( $field[ 'type' ], array( 'submit', 'reset', 'button' ) ) ) ? $field[ 'type' ] : 'submit'; |
|
| 533 | 533 | |
| 534 | 534 | $attributes = $this->get_field_attributes( $field ); |
| 535 | 535 | $default_value = Utils::get( $field, 'value', Utils::get( $field, 'default_value' ) ); |
| 536 | - $value = $this->get( $field['name'], $default_value ); |
|
| 536 | + $value = $this->get( $field[ 'name' ], $default_value ); |
|
| 537 | 537 | |
| 538 | 538 | |
| 539 | - $attributes['class'] = isset( $attributes['class'] ) ? esc_attr( $attributes['class'] ) : 'button-primary gfbutton'; |
|
| 540 | - $name = ( $field['name'] === 'gform-settings-save' ) ? $field['name'] : '_gaddon_setting_' . $field['name']; |
|
| 539 | + $attributes[ 'class' ] = isset( $attributes[ 'class' ] ) ? esc_attr( $attributes[ 'class' ] ) : 'button-primary gfbutton'; |
|
| 540 | + $name = ( $field[ 'name' ] === 'gform-settings-save' ) ? $field[ 'name' ] : '_gaddon_setting_' . $field[ 'name' ]; |
|
| 541 | 541 | |
| 542 | 542 | if ( empty( $value ) ) { |
| 543 | 543 | $value = __( 'Update Settings', 'gravityview' ); |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | $attributes = $this->get_field_attributes( $field ); |
| 547 | 547 | |
| 548 | 548 | $html = '<input |
| 549 | - type="' . $field['type'] . '" |
|
| 549 | + type="' . $field[ 'type' ] . '" |
|
| 550 | 550 | name="' . esc_attr( $name ) . '" |
| 551 | 551 | value="' . $value . '" ' . |
| 552 | 552 | implode( ' ', $attributes ) . |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | public function license_key_notice() { |
| 576 | 576 | $license_status = $this->get( 'license_key_status' ); |
| 577 | 577 | $license_key = $this->get( 'license_key' ); |
| 578 | - if( '' === $license_key ) { |
|
| 578 | + if ( '' === $license_key ) { |
|
| 579 | 579 | $license_status = 'inactive'; |
| 580 | 580 | } |
| 581 | 581 | $license_id = empty( $license_key ) ? 'license' : $license_key; |
@@ -587,7 +587,7 @@ discard block |
||
| 587 | 587 | * but didn't want to mess up the translation strings for the translators. |
| 588 | 588 | */ |
| 589 | 589 | $message = mb_substr( $message, 0, mb_strlen( $message ) - 1 ); |
| 590 | - $title = __ ( 'Inactive License', 'gravityview'); |
|
| 590 | + $title = __( 'Inactive License', 'gravityview' ); |
|
| 591 | 591 | $status = ''; |
| 592 | 592 | $update_below = false; |
| 593 | 593 | $primary_button_link = admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ); |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | $update_below = __( 'Activate your license key below.', 'gravityview' ); |
| 618 | 618 | break; |
| 619 | 619 | } |
| 620 | - $url = 'https://gravityview.co/pricing/?utm_source=admin_notice&utm_medium=admin&utm_content='.$license_status.'&utm_campaign=Admin%20Notice'; |
|
| 620 | + $url = 'https://gravityview.co/pricing/?utm_source=admin_notice&utm_medium=admin&utm_content=' . $license_status . '&utm_campaign=Admin%20Notice'; |
|
| 621 | 621 | |
| 622 | 622 | // Show a different notice on settings page for inactive licenses (hide the buttons) |
| 623 | 623 | if ( $update_below && gravityview_is_admin_page( '', 'settings' ) ) { |
@@ -659,7 +659,7 @@ discard block |
||
| 659 | 659 | public function scripts() { |
| 660 | 660 | $scripts = parent::scripts(); |
| 661 | 661 | |
| 662 | - $scripts[] = array( |
|
| 662 | + $scripts[ ] = array( |
|
| 663 | 663 | 'handle' => 'gform_tooltip_init', |
| 664 | 664 | 'enqueue' => array( |
| 665 | 665 | array( |
@@ -678,7 +678,7 @@ discard block |
||
| 678 | 678 | public function styles() { |
| 679 | 679 | $styles = parent::styles(); |
| 680 | 680 | |
| 681 | - $styles[] = array( |
|
| 681 | + $styles[ ] = array( |
|
| 682 | 682 | 'handle' => 'gravityview_settings', |
| 683 | 683 | 'src' => plugins_url( 'assets/css/admin-settings.css', GRAVITYVIEW_FILE ), |
| 684 | 684 | 'version' => Plugin::$version, |
@@ -709,7 +709,7 @@ discard block |
||
| 709 | 709 | * If multisite and not network admin, we don't want the settings to show. |
| 710 | 710 | * @since 1.7.6 |
| 711 | 711 | */ |
| 712 | - $show_submenu = ( ! is_multisite() ) || is_main_site() || ( ! gravityview()->plugin->is_network_activated() ) || ( is_network_admin() && gravityview()->plugin->is_network_activated() ); |
|
| 712 | + $show_submenu = ( ! is_multisite() ) || is_main_site() || ( ! gravityview()->plugin->is_network_activated() ) || ( is_network_admin() && gravityview()->plugin->is_network_activated() ); |
|
| 713 | 713 | |
| 714 | 714 | /** |
| 715 | 715 | * Override whether to show the Settings menu on a per-blog basis. |
@@ -752,26 +752,26 @@ discard block |
||
| 752 | 752 | 'label' => __( 'License Key', 'gravityview' ), |
| 753 | 753 | 'description' => __( 'Enter the license key that was sent to you on purchase. This enables plugin updates & support.', 'gravityview' ) . $this->get_license_handler()->license_details( $this->get_app_setting( 'license_key_response' ) ), |
| 754 | 754 | 'type' => 'edd_license', |
| 755 | - 'disabled' => ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ), |
|
| 755 | + 'disabled' => ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ), |
|
| 756 | 756 | 'data-pending-text' => __( 'Verifying license…', 'gravityview' ), |
| 757 | - 'default_value' => $default_settings['license_key'], |
|
| 757 | + 'default_value' => $default_settings[ 'license_key' ], |
|
| 758 | 758 | 'class' => ( '' == $this->get( 'license_key' ) ) ? 'activate code regular-text edd-license-key' : 'deactivate code regular-text edd-license-key', |
| 759 | 759 | ), |
| 760 | 760 | array( |
| 761 | 761 | 'name' => 'license_key_response', |
| 762 | - 'default_value' => $default_settings['license_key_response'], |
|
| 762 | + 'default_value' => $default_settings[ 'license_key_response' ], |
|
| 763 | 763 | 'type' => 'hidden', |
| 764 | 764 | ), |
| 765 | 765 | array( |
| 766 | 766 | 'name' => 'license_key_status', |
| 767 | - 'default_value' => $default_settings['license_key_status'], |
|
| 767 | + 'default_value' => $default_settings[ 'license_key_status' ], |
|
| 768 | 768 | 'type' => 'hidden', |
| 769 | 769 | ), |
| 770 | 770 | array( |
| 771 | 771 | 'name' => 'support-email', |
| 772 | 772 | 'type' => 'text', |
| 773 | 773 | 'validate' => 'email', |
| 774 | - 'default_value' => $default_settings['support-email'], |
|
| 774 | + 'default_value' => $default_settings[ 'support-email' ], |
|
| 775 | 775 | 'label' => __( 'Support Email', 'gravityview' ), |
| 776 | 776 | 'description' => __( 'In order to provide responses to your support requests, please provide your email address.', 'gravityview' ), |
| 777 | 777 | 'class' => 'code regular-text', |
@@ -783,7 +783,7 @@ discard block |
||
| 783 | 783 | 'name' => 'support_port', |
| 784 | 784 | 'type' => 'radio', |
| 785 | 785 | 'label' => __( 'Show Support Port?', 'gravityview' ), |
| 786 | - 'default_value' => $default_settings['support_port'], |
|
| 786 | + 'default_value' => $default_settings[ 'support_port' ], |
|
| 787 | 787 | 'horizontal' => 1, |
| 788 | 788 | 'choices' => array( |
| 789 | 789 | array( |
@@ -802,7 +802,7 @@ discard block |
||
| 802 | 802 | 'name' => 'no-conflict-mode', |
| 803 | 803 | 'type' => 'radio', |
| 804 | 804 | 'label' => __( 'No-Conflict Mode', 'gravityview' ), |
| 805 | - 'default_value' => $default_settings['no-conflict-mode'], |
|
| 805 | + 'default_value' => $default_settings[ 'no-conflict-mode' ], |
|
| 806 | 806 | 'horizontal' => 1, |
| 807 | 807 | 'choices' => array( |
| 808 | 808 | array( |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | 'name' => 'rest_api', |
| 825 | 825 | 'type' => 'radio', |
| 826 | 826 | 'label' => __( 'REST API', 'gravityview' ), |
| 827 | - 'default_value' => $default_settings['rest_api'], |
|
| 827 | + 'default_value' => $default_settings[ 'rest_api' ], |
|
| 828 | 828 | 'horizontal' => 1, |
| 829 | 829 | 'choices' => array( |
| 830 | 830 | array( |
@@ -843,7 +843,7 @@ discard block |
||
| 843 | 843 | 'name' => 'beta', |
| 844 | 844 | 'type' => 'checkbox', |
| 845 | 845 | 'label' => __( 'Become a Beta Tester', 'gravityview' ), |
| 846 | - 'default_value' => $default_settings['beta'], |
|
| 846 | + 'default_value' => $default_settings[ 'beta' ], |
|
| 847 | 847 | 'horizontal' => 1, |
| 848 | 848 | 'choices' => array( |
| 849 | 849 | array( |
@@ -876,17 +876,17 @@ discard block |
||
| 876 | 876 | * @since 1.7.4 |
| 877 | 877 | */ |
| 878 | 878 | foreach ( $fields as &$field ) { |
| 879 | - $field['name'] = isset( $field['name'] ) ? $field['name'] : Utils::get( $field, 'id' ); |
|
| 880 | - $field['label'] = isset( $field['label'] ) ? $field['label'] : Utils::get( $field, 'title' ); |
|
| 881 | - $field['default_value'] = isset( $field['default_value'] ) ? $field['default_value'] : Utils::get( $field, 'default' ); |
|
| 882 | - $field['description'] = isset( $field['description'] ) ? $field['description'] : Utils::get( $field, 'subtitle' ); |
|
| 879 | + $field[ 'name' ] = isset( $field[ 'name' ] ) ? $field[ 'name' ] : Utils::get( $field, 'id' ); |
|
| 880 | + $field[ 'label' ] = isset( $field[ 'label' ] ) ? $field[ 'label' ] : Utils::get( $field, 'title' ); |
|
| 881 | + $field[ 'default_value' ] = isset( $field[ 'default_value' ] ) ? $field[ 'default_value' ] : Utils::get( $field, 'default' ); |
|
| 882 | + $field[ 'description' ] = isset( $field[ 'description' ] ) ? $field[ 'description' ] : Utils::get( $field, 'subtitle' ); |
|
| 883 | 883 | |
| 884 | 884 | if ( $disabled_attribute ) { |
| 885 | - $field['disabled'] = $disabled_attribute; |
|
| 885 | + $field[ 'disabled' ] = $disabled_attribute; |
|
| 886 | 886 | } |
| 887 | 887 | |
| 888 | - if ( empty( $field['disabled'] ) ) { |
|
| 889 | - unset( $field['disabled'] ); |
|
| 888 | + if ( empty( $field[ 'disabled' ] ) ) { |
|
| 889 | + unset( $field[ 'disabled' ] ); |
|
| 890 | 890 | } |
| 891 | 891 | } |
| 892 | 892 | |
@@ -904,7 +904,7 @@ discard block |
||
| 904 | 904 | ); |
| 905 | 905 | |
| 906 | 906 | if ( $disabled_attribute ) { |
| 907 | - $button['disabled'] = $disabled_attribute; |
|
| 907 | + $button[ 'disabled' ] = $disabled_attribute; |
|
| 908 | 908 | } |
| 909 | 909 | |
| 910 | 910 | /** |
@@ -923,20 +923,20 @@ discard block |
||
| 923 | 923 | // If there are extensions, add a section for them |
| 924 | 924 | if ( ! empty( $extension_sections ) ) { |
| 925 | 925 | |
| 926 | - if( $disabled_attribute ) { |
|
| 926 | + if ( $disabled_attribute ) { |
|
| 927 | 927 | foreach ( $extension_sections as &$section ) { |
| 928 | - foreach ( $section['fields'] as &$field ) { |
|
| 929 | - $field['disabled'] = $disabled_attribute; |
|
| 928 | + foreach ( $section[ 'fields' ] as &$field ) { |
|
| 929 | + $field[ 'disabled' ] = $disabled_attribute; |
|
| 930 | 930 | } |
| 931 | 931 | } |
| 932 | 932 | } |
| 933 | 933 | |
| 934 | - $k = count( $extension_sections ) - 1 ; |
|
| 935 | - $extension_sections[ $k ]['fields'][] = $button; |
|
| 934 | + $k = count( $extension_sections ) - 1; |
|
| 935 | + $extension_sections[ $k ][ 'fields' ][ ] = $button; |
|
| 936 | 936 | $sections = array_merge( $sections, $extension_sections ); |
| 937 | 937 | } else { |
| 938 | 938 | // add the 'update settings' button to the general section |
| 939 | - $sections[0]['fields'][] = $button; |
|
| 939 | + $sections[ 0 ][ 'fields' ][ ] = $button; |
|
| 940 | 940 | } |
| 941 | 941 | |
| 942 | 942 | return $sections; |
@@ -992,7 +992,7 @@ discard block |
||
| 992 | 992 | protected function settings_edd_license( $field, $echo = true ) { |
| 993 | 993 | |
| 994 | 994 | if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
| 995 | - $field['input_type'] = 'password'; |
|
| 995 | + $field[ 'input_type' ] = 'password'; |
|
| 996 | 996 | } |
| 997 | 997 | |
| 998 | 998 | $text = $this->settings_text( $field, false ); |
@@ -1017,10 +1017,10 @@ discard block |
||
| 1017 | 1017 | * @return string |
| 1018 | 1018 | */ |
| 1019 | 1019 | public function settings_save( $field, $echo = true ) { |
| 1020 | - $field['type'] = 'submit'; |
|
| 1021 | - $field['name'] = 'gform-settings-save'; |
|
| 1022 | - $field['class'] = isset( $field['class'] ) ? $field['class'] : 'button-primary gfbutton'; |
|
| 1023 | - $field['value'] = Utils::get( $field, 'value', __( 'Update Settings', 'gravityview' ) ); |
|
| 1020 | + $field[ 'type' ] = 'submit'; |
|
| 1021 | + $field[ 'name' ] = 'gform-settings-save'; |
|
| 1022 | + $field[ 'class' ] = isset( $field[ 'class' ] ) ? $field[ 'class' ] : 'button-primary gfbutton'; |
|
| 1023 | + $field[ 'value' ] = Utils::get( $field, 'value', __( 'Update Settings', 'gravityview' ) ); |
|
| 1024 | 1024 | |
| 1025 | 1025 | $output = $this->settings_submit( $field, false ); |
| 1026 | 1026 | |
@@ -1051,8 +1051,8 @@ discard block |
||
| 1051 | 1051 | * @return void |
| 1052 | 1052 | */ |
| 1053 | 1053 | public function single_setting_row( $field ) { |
| 1054 | - $field['gv_description'] = Utils::get( $field, 'description' ); |
|
| 1055 | - $field['description'] = Utils::get( $field, 'subtitle' ); |
|
| 1054 | + $field[ 'gv_description' ] = Utils::get( $field, 'description' ); |
|
| 1055 | + $field[ 'description' ] = Utils::get( $field, 'subtitle' ); |
|
| 1056 | 1056 | parent::single_setting_row( $field ); |
| 1057 | 1057 | } |
| 1058 | 1058 | |
@@ -1064,7 +1064,7 @@ discard block |
||
| 1064 | 1064 | public function single_setting_label( $field ) { |
| 1065 | 1065 | parent::single_setting_label( $field ); |
| 1066 | 1066 | if ( $description = Utils::get( $field, 'gv_description' ) ) { |
| 1067 | - echo '<span class="description">'. $description .'</span>'; |
|
| 1067 | + echo '<span class="description">' . $description . '</span>'; |
|
| 1068 | 1068 | } |
| 1069 | 1069 | } |
| 1070 | 1070 | |
@@ -1101,9 +1101,9 @@ discard block |
||
| 1101 | 1101 | // If the posted key doesn't match the activated/deactivated key (set using the Activate License button, AJAX response), |
| 1102 | 1102 | // then we assume it's changed. If it's changed, unset the status and the previous response. |
| 1103 | 1103 | if ( $local_key !== $response_key ) { |
| 1104 | - unset( $posted_settings['license_key_response'] ); |
|
| 1105 | - unset( $posted_settings['license_key_status'] ); |
|
| 1106 | - GFCommon::add_error_message( __('The license key you entered has been saved, but not activated. Please activate the license.', 'gravityview' ) ); |
|
| 1104 | + unset( $posted_settings[ 'license_key_response' ] ); |
|
| 1105 | + unset( $posted_settings[ 'license_key_status' ] ); |
|
| 1106 | + GFCommon::add_error_message( __( 'The license key you entered has been saved, but not activated. Please activate the license.', 'gravityview' ) ); |
|
| 1107 | 1107 | } |
| 1108 | 1108 | return $posted_settings; |
| 1109 | 1109 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | global $post; |
| 35 | 35 | |
| 36 | 36 | if ( $post ) { |
| 37 | - $context['post'] = $post; |
|
| 37 | + $context[ 'post' ] = $post; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | \GV\Mocks\Legacy_Context::push( $context ); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | wp_embed_register_handler( 'gravityview_entry', self::get_entry_regex(), array( __CLASS__, 'render' ), 20000 ); |
| 27 | 27 | wp_oembed_add_provider( self::get_entry_regex(), self::$provider_url, true ); |
| 28 | 28 | |
| 29 | - if ( ! empty( $_GET['gv_oembed_provider'] ) && ! empty( $_GET['url'] ) ) { |
|
| 29 | + if ( ! empty( $_GET[ 'gv_oembed_provider' ] ) && ! empty( $_GET[ 'url' ] ) ) { |
|
| 30 | 30 | add_action( 'template_redirect', array( __CLASS__, 'render_provider_request' ) ); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -43,8 +43,8 @@ discard block |
||
| 43 | 43 | * @return void |
| 44 | 44 | */ |
| 45 | 45 | public static function render_provider_request() { |
| 46 | - if ( ! empty( $_GET['url'] ) ) { |
|
| 47 | - $url = $_GET['url']; |
|
| 46 | + if ( ! empty( $_GET[ 'url' ] ) ) { |
|
| 47 | + $url = $_GET[ 'url' ]; |
|
| 48 | 48 | } else { |
| 49 | 49 | header( 'HTTP/1.0 404 Not Found' ); |
| 50 | 50 | exit; |
@@ -111,18 +111,18 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | private static function parse_matches( $matches, $url ) { |
| 113 | 113 | // If not using permalinks, re-assign values for matching groups |
| 114 | - if ( ! empty( $matches['entry_slug2'] ) ) { |
|
| 115 | - $matches['is_cpt'] = $matches['is_cpt2']; |
|
| 116 | - $matches['slug'] = $matches['slug2']; |
|
| 117 | - $matches['entry_slug'] = $matches['entry_slug2']; |
|
| 118 | - unset( $matches['is_cpt2'], $matches['slug2'], $matches['entry_slug2'] ); |
|
| 114 | + if ( ! empty( $matches[ 'entry_slug2' ] ) ) { |
|
| 115 | + $matches[ 'is_cpt' ] = $matches[ 'is_cpt2' ]; |
|
| 116 | + $matches[ 'slug' ] = $matches[ 'slug2' ]; |
|
| 117 | + $matches[ 'entry_slug' ] = $matches[ 'entry_slug2' ]; |
|
| 118 | + unset( $matches[ 'is_cpt2' ], $matches[ 'slug2' ], $matches[ 'entry_slug2' ] ); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - if ( empty( $matches['entry_slug'] ) ) { |
|
| 121 | + if ( empty( $matches[ 'entry_slug' ] ) ) { |
|
| 122 | 122 | gravityview()->log->error( 'Entry slug not parsed by regex.', array( 'data' => $matches ) ); |
| 123 | 123 | return null; |
| 124 | 124 | } else { |
| 125 | - $entry_id = $matches['entry_slug']; |
|
| 125 | + $entry_id = $matches[ 'entry_slug' ]; |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | if ( ! $entry = \GV\GF_Entry::by_id( $entry_id ) ) { |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | if ( ! $view_id = url_to_postid( $url ) ) { |
| 134 | - $view = \GV\View::from_post( get_page_by_path( $matches['slug'], OBJECT, 'gravityview' ) ); |
|
| 134 | + $view = \GV\View::from_post( get_page_by_path( $matches[ 'slug' ], OBJECT, 'gravityview' ) ); |
|
| 135 | 135 | } else { |
| 136 | 136 | $view = \GV\View::by_id( $view_id ); |
| 137 | 137 | } |
@@ -163,9 +163,9 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | return ' |
| 165 | 165 | <div class="loading-placeholder" style="background-color:#e6f0f5;"> |
| 166 | - <h3 style="margin:0; padding:0; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \'Helvetica Neue\', sans-serif;">'.$image.$embed_heading.'</h3> |
|
| 166 | + <h3 style="margin:0; padding:0; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \'Helvetica Neue\', sans-serif;">'.$image . $embed_heading . '</h3> |
|
| 167 | 167 | <p style="margin:0; padding:0; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \'Helvetica Neue\', sans-serif;"> |
| 168 | - '.$embed_text.' |
|
| 168 | + '.$embed_text . ' |
|
| 169 | 169 | </p> |
| 170 | 170 | <br style="clear: both;"> |
| 171 | 171 | </div>'; |
@@ -179,8 +179,8 @@ discard block |
||
| 179 | 179 | private static function render_preview_notice() { |
| 180 | 180 | $floaty = \GravityView_Admin::get_floaty(); |
| 181 | 181 | $title = esc_html__( 'This will look better when it is embedded.', 'gravityview' ); |
| 182 | - $message = esc_html__( 'Styles don\'t get loaded when being previewed, so the content below will look strange. Don\'t be concerned!', 'gravityview'); |
|
| 183 | - return '<div class="updated notice">'.$floaty.'<h3>'.$title.'</h3><p>'.$message.'</p><br style="clear:both;" /></div>'; |
|
| 182 | + $message = esc_html__( 'Styles don\'t get loaded when being previewed, so the content below will look strange. Don\'t be concerned!', 'gravityview' ); |
|
| 183 | + return '<div class="updated notice">' . $floaty . '<h3>' . $title . '</h3><p>' . $message . '</p><br style="clear:both;" /></div>'; |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | /** |
@@ -199,13 +199,13 @@ discard block |
||
| 199 | 199 | return __( 'You are not allowed to view this content.', 'gravityview' ); |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | - if ( $entry['status'] != 'active' ) { |
|
| 202 | + if ( $entry[ 'status' ] != 'active' ) { |
|
| 203 | 203 | gravityview()->log->notice( 'Entry ID #{entry_id} is not active', array( 'entry_id' => $entry->ID ) ); |
| 204 | 204 | return __( 'You are not allowed to view this content.', 'gravityview' ); |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | if ( $view->settings->get( 'show_only_approved' ) ) { |
| 208 | - if ( ! \GravityView_Entry_Approval_Status::is_approved( gform_get_meta( $entry->ID, \GravityView_Entry_Approval::meta_key ) ) ) { |
|
| 208 | + if ( ! \GravityView_Entry_Approval_Status::is_approved( gform_get_meta( $entry->ID, \GravityView_Entry_Approval::meta_key ) ) ) { |
|
| 209 | 209 | gravityview()->log->error( 'Entry ID #{entry_id} is not approved for viewing', array( 'entry_id' => $entry->ID ) ); |
| 210 | 210 | return __( 'You are not allowed to view this content.', 'gravityview' ); |
| 211 | 211 | } |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | // Catch either |
| 270 | 270 | $match_regex = "(?:{$using_permalinks}|{$not_using_permalinks})"; |
| 271 | 271 | |
| 272 | - return '#'.$match_regex.'#i'; |
|
| 272 | + return '#' . $match_regex . '#i'; |
|
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | /** |
@@ -144,11 +144,11 @@ discard block |
||
| 144 | 144 | do_action( 'gravityview/template/list/body/before', $context ); |
| 145 | 145 | |
| 146 | 146 | /** |
| 147 | - * @action `gravityview_list_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows. |
|
| 148 | - * @deprecated Use `gravityview/template/list/body/before` |
|
| 149 | - * @since 1.0.7 |
|
| 150 | - * @param GravityView_View $gravityview_view Current GravityView_View object. |
|
| 151 | - */ |
|
| 147 | + * @action `gravityview_list_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows. |
|
| 148 | + * @deprecated Use `gravityview/template/list/body/before` |
|
| 149 | + * @since 1.0.7 |
|
| 150 | + * @param GravityView_View $gravityview_view Current GravityView_View object. |
|
| 151 | + */ |
|
| 152 | 152 | do_action( 'gravityview_list_body_before', \GravityView_View::getInstance() /** ugh! */ ); |
| 153 | 153 | } |
| 154 | 154 | |
@@ -170,11 +170,11 @@ discard block |
||
| 170 | 170 | do_action( 'gravityview/template/list/body/after', $context ); |
| 171 | 171 | |
| 172 | 172 | /** |
| 173 | - * @action `gravityview_list_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows. |
|
| 174 | - * @deprecated Use `gravityview/template/list/body/after` |
|
| 175 | - * @since 1.0.7 |
|
| 176 | - * @param GravityView_View $gravityview_view Current GravityView_View object. |
|
| 177 | - */ |
|
| 173 | + * @action `gravityview_list_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows. |
|
| 174 | + * @deprecated Use `gravityview/template/list/body/after` |
|
| 175 | + * @since 1.0.7 |
|
| 176 | + * @param GravityView_View $gravityview_view Current GravityView_View object. |
|
| 177 | + */ |
|
| 178 | 178 | do_action( 'gravityview_list_body_after', \GravityView_View::getInstance() /** ugh! */ ); |
| 179 | 179 | } |
| 180 | 180 | |
@@ -205,11 +205,11 @@ discard block |
||
| 205 | 205 | $zone = str_replace( '/', '_', $zone ); |
| 206 | 206 | |
| 207 | 207 | /** |
| 208 | - * @action `gravityview_list_entry_$zone_before` Inside the `entry`, before any rows are rendered. Can be used to insert additional rows. |
|
| 209 | - * @deprecated Use `gravityview/template/list/entry/$zone/before` |
|
| 210 | - * @since 1.0.7 |
|
| 211 | - * @param GravityView_View $gravityview_view Current GravityView_View object. |
|
| 212 | - */ |
|
| 208 | + * @action `gravityview_list_entry_$zone_before` Inside the `entry`, before any rows are rendered. Can be used to insert additional rows. |
|
| 209 | + * @deprecated Use `gravityview/template/list/entry/$zone/before` |
|
| 210 | + * @since 1.0.7 |
|
| 211 | + * @param GravityView_View $gravityview_view Current GravityView_View object. |
|
| 212 | + */ |
|
| 213 | 213 | do_action( sprintf( 'gravityview_list_entry%sbefore', $zone ), $entry->as_entry(), \GravityView_View::getInstance() /** ugh! */ ); |
| 214 | 214 | } |
| 215 | 215 | |
@@ -240,11 +240,11 @@ discard block |
||
| 240 | 240 | $zone = str_replace( '/', '_', $zone ); |
| 241 | 241 | |
| 242 | 242 | /** |
| 243 | - * @action `gravityview_list_entry_$zone_after` Inside the `entry`, after any rows are rendered. Can be used to insert additional rows. |
|
| 244 | - * @deprecated Use `gravityview/template/list/entry/after` |
|
| 245 | - * @since 1.0.7 |
|
| 246 | - * @param GravityView_View $gravityview_view Current GravityView_View object. |
|
| 247 | - */ |
|
| 243 | + * @action `gravityview_list_entry_$zone_after` Inside the `entry`, after any rows are rendered. Can be used to insert additional rows. |
|
| 244 | + * @deprecated Use `gravityview/template/list/entry/after` |
|
| 245 | + * @since 1.0.7 |
|
| 246 | + * @param GravityView_View $gravityview_view Current GravityView_View object. |
|
| 247 | + */ |
|
| 248 | 248 | do_action( sprintf( 'gravityview_list_entry%safter', $zone ), $entry->as_entry(), \GravityView_View::getInstance() /** ugh! */ ); |
| 249 | 249 | } |
| 250 | 250 | } |
@@ -64,9 +64,9 @@ |
||
| 64 | 64 | */ |
| 65 | 65 | $hide_empty = apply_filters( 'gravityview/render/hide-empty-zone', Utils::get( $extras, 'hide_empty', $this->view->settings->get( 'hide_empty', false ) ), $context ); |
| 66 | 66 | |
| 67 | - $extras['hide_empty'] = $hide_empty; |
|
| 68 | - $extras['label'] = $label; |
|
| 69 | - $extras['value'] = $value; |
|
| 67 | + $extras[ 'hide_empty' ] = $hide_empty; |
|
| 68 | + $extras[ 'label' ] = $label; |
|
| 69 | + $extras[ 'value' ] = $value; |
|
| 70 | 70 | |
| 71 | 71 | return \gravityview_field_output( $extras, $context ); |
| 72 | 72 | } |
@@ -146,59 +146,59 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | if ( $this->request && $this->request->is_view() && $post ) { |
| 148 | 148 | if ( $this->field && $this->field->type ) { |
| 149 | - $specifics []= sprintf( '%spost-%d-view-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->type, $slug_name ); |
|
| 150 | - $this->field->inputType && $specifics []= sprintf( '%spost-%d-view-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->inputType, $slug_name ); |
|
| 151 | - $specifics []= sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->type ); |
|
| 152 | - $this->field->inputType && $specifics []= sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->inputType ); |
|
| 153 | - $specifics []= sprintf( '%spost-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->field->type, $slug_name ); |
|
| 154 | - $this->field->inputType && $specifics []= sprintf( '%spost-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->field->inputType, $slug_name ); |
|
| 155 | - $specifics []= sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $this->field->type ); |
|
| 156 | - $this->field->inputType && $specifics []= sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $this->field->inputType ); |
|
| 149 | + $specifics [ ] = sprintf( '%spost-%d-view-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->type, $slug_name ); |
|
| 150 | + $this->field->inputType && $specifics [ ] = sprintf( '%spost-%d-view-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->inputType, $slug_name ); |
|
| 151 | + $specifics [ ] = sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->type ); |
|
| 152 | + $this->field->inputType && $specifics [ ] = sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->inputType ); |
|
| 153 | + $specifics [ ] = sprintf( '%spost-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->field->type, $slug_name ); |
|
| 154 | + $this->field->inputType && $specifics [ ] = sprintf( '%spost-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->field->inputType, $slug_name ); |
|
| 155 | + $specifics [ ] = sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $this->field->type ); |
|
| 156 | + $this->field->inputType && $specifics [ ] = sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $this->field->inputType ); |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - $specifics []= sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $slug_name ); |
|
| 160 | - $specifics []= sprintf( '%spost-%d-view-%d-field.php', $slug_dir, $post->ID, $this->view->ID ); |
|
| 161 | - $specifics []= sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $slug_name ); |
|
| 162 | - $specifics []= sprintf( '%spost-%d-field.php', $slug_dir, $post->ID ); |
|
| 159 | + $specifics [ ] = sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $slug_name ); |
|
| 160 | + $specifics [ ] = sprintf( '%spost-%d-view-%d-field.php', $slug_dir, $post->ID, $this->view->ID ); |
|
| 161 | + $specifics [ ] = sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $slug_name ); |
|
| 162 | + $specifics [ ] = sprintf( '%spost-%d-field.php', $slug_dir, $post->ID ); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** Field-specific */ |
| 166 | 166 | if ( $this->field && $this->view ) { |
| 167 | 167 | |
| 168 | 168 | if ( $this->field->ID ) { |
| 169 | - $specifics []= sprintf( '%sform-%d-field-%d-%s.php', $slug_dir, $this->view->form->ID, $this->field->ID, $slug_name ); |
|
| 170 | - $specifics []= sprintf( '%sform-%d-field-%d.php', $slug_dir, $this->view->form->ID, $this->field->ID ); |
|
| 169 | + $specifics [ ] = sprintf( '%sform-%d-field-%d-%s.php', $slug_dir, $this->view->form->ID, $this->field->ID, $slug_name ); |
|
| 170 | + $specifics [ ] = sprintf( '%sform-%d-field-%d.php', $slug_dir, $this->view->form->ID, $this->field->ID ); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | if ( $this->field->type ) { |
| 174 | - $specifics []= sprintf( '%sform-%d-field-%s-%s.php', $slug_dir, $this->view->form->ID, $this->field->type, $slug_name ); |
|
| 175 | - $this->field->inputType && $specifics []= sprintf( '%sform-%d-field-%s-%s.php', $slug_dir, $this->view->form->ID, $this->field->inputType, $slug_name ); |
|
| 176 | - $specifics []= sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $this->field->type ); |
|
| 177 | - $this->field->inputType && $specifics []= sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $this->field->inputType ); |
|
| 178 | - |
|
| 179 | - $specifics []= sprintf( '%sview-%d-field-%s-%s.php', $slug_dir, $this->view->ID, $this->field->type, $slug_name ); |
|
| 180 | - $this->field->inputType && $specifics []= sprintf( '%sview-%d-field-%s-%s.php', $slug_dir, $this->view->ID, $this->field->inputType, $slug_name ); |
|
| 181 | - $specifics []= sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $this->field->type ); |
|
| 182 | - $this->field->inputType && $specifics []= sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $this->field->inputType ); |
|
| 183 | - |
|
| 184 | - $specifics []= sprintf( '%sfield-%s-%s.php', $slug_dir, $this->field->type, $slug_name ); |
|
| 185 | - $this->field->inputType && $specifics []= sprintf( '%sfield-%s-%s.php', $slug_dir, $this->field->inputType, $slug_name ); |
|
| 186 | - $specifics []= sprintf( '%sfield-%s.php', $slug_dir, $this->field->type ); |
|
| 187 | - $this->field->inputType && $specifics []= sprintf( '%sfield-%s.php', $slug_dir, $this->field->inputType ); |
|
| 174 | + $specifics [ ] = sprintf( '%sform-%d-field-%s-%s.php', $slug_dir, $this->view->form->ID, $this->field->type, $slug_name ); |
|
| 175 | + $this->field->inputType && $specifics [ ] = sprintf( '%sform-%d-field-%s-%s.php', $slug_dir, $this->view->form->ID, $this->field->inputType, $slug_name ); |
|
| 176 | + $specifics [ ] = sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $this->field->type ); |
|
| 177 | + $this->field->inputType && $specifics [ ] = sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $this->field->inputType ); |
|
| 178 | + |
|
| 179 | + $specifics [ ] = sprintf( '%sview-%d-field-%s-%s.php', $slug_dir, $this->view->ID, $this->field->type, $slug_name ); |
|
| 180 | + $this->field->inputType && $specifics [ ] = sprintf( '%sview-%d-field-%s-%s.php', $slug_dir, $this->view->ID, $this->field->inputType, $slug_name ); |
|
| 181 | + $specifics [ ] = sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $this->field->type ); |
|
| 182 | + $this->field->inputType && $specifics [ ] = sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $this->field->inputType ); |
|
| 183 | + |
|
| 184 | + $specifics [ ] = sprintf( '%sfield-%s-%s.php', $slug_dir, $this->field->type, $slug_name ); |
|
| 185 | + $this->field->inputType && $specifics [ ] = sprintf( '%sfield-%s-%s.php', $slug_dir, $this->field->inputType, $slug_name ); |
|
| 186 | + $specifics [ ] = sprintf( '%sfield-%s.php', $slug_dir, $this->field->type ); |
|
| 187 | + $this->field->inputType && $specifics [ ] = sprintf( '%sfield-%s.php', $slug_dir, $this->field->inputType ); |
|
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | if ( $this->view ) { |
| 192 | 192 | /** Generic field templates */ |
| 193 | - $specifics []= sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $slug_name ); |
|
| 194 | - $specifics []= sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $slug_name ); |
|
| 193 | + $specifics [ ] = sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $slug_name ); |
|
| 194 | + $specifics [ ] = sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $slug_name ); |
|
| 195 | 195 | |
| 196 | - $specifics []= sprintf( '%sview-%d-field.php', $slug_dir, $this->view->ID ); |
|
| 197 | - $specifics []= sprintf( '%sform-%d-field.php', $slug_dir, $this->view->form->ID ); |
|
| 196 | + $specifics [ ] = sprintf( '%sview-%d-field.php', $slug_dir, $this->view->ID ); |
|
| 197 | + $specifics [ ] = sprintf( '%sform-%d-field.php', $slug_dir, $this->view->form->ID ); |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - $specifics []= sprintf( '%sfield-%s.php', $slug_dir, $slug_name ); |
|
| 201 | - $specifics []= sprintf( '%sfield.php', $slug_dir ); |
|
| 200 | + $specifics [ ] = sprintf( '%sfield-%s.php', $slug_dir, $slug_name ); |
|
| 201 | + $specifics [ ] = sprintf( '%sfield.php', $slug_dir ); |
|
| 202 | 202 | |
| 203 | 203 | |
| 204 | 204 | return array_merge( $specifics, $templates ); |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | /** Prevent any PHP warnings that may be generated. */ |
| 225 | 225 | ob_start(); |
| 226 | 226 | |
| 227 | - $display_value = \GFCommon::get_lead_field_display( $this->field->field, $value, $this->entry['currency'], false, 'html' ); |
|
| 227 | + $display_value = \GFCommon::get_lead_field_display( $this->field->field, $value, $this->entry[ 'currency' ], false, 'html' ); |
|
| 228 | 228 | |
| 229 | 229 | if ( $errors = ob_get_clean() ) { |
| 230 | 230 | gravityview()->log->error( 'Errors when calling GFCommon::get_lead_field_display()', array( 'data' => $errors ) ); |
@@ -113,14 +113,14 @@ |
||
| 113 | 113 | |
| 114 | 114 | /** Require critical legacy core files. @todo Deprecate */ |
| 115 | 115 | require_once $this->plugin->dir( 'includes/helper-functions.php' ); |
| 116 | - require_once $this->plugin->dir( 'includes/class-common.php'); |
|
| 117 | - require_once $this->plugin->dir( 'includes/connector-functions.php'); |
|
| 116 | + require_once $this->plugin->dir( 'includes/class-common.php' ); |
|
| 117 | + require_once $this->plugin->dir( 'includes/connector-functions.php' ); |
|
| 118 | 118 | require_once $this->plugin->dir( 'includes/class-gravityview-compatibility.php' ); |
| 119 | 119 | require_once $this->plugin->dir( 'includes/class-gravityview-roles-capabilities.php' ); |
| 120 | 120 | require_once $this->plugin->dir( 'includes/class-gravityview-admin-notices.php' ); |
| 121 | 121 | require_once $this->plugin->dir( 'includes/class-admin.php' ); |
| 122 | - require_once $this->plugin->dir( 'includes/class-post-types.php'); |
|
| 123 | - require_once $this->plugin->dir( 'includes/class-cache.php'); |
|
| 122 | + require_once $this->plugin->dir( 'includes/class-post-types.php' ); |
|
| 123 | + require_once $this->plugin->dir( 'includes/class-cache.php' ); |
|
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | 126 | * GravityView extensions and widgets. |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | * @return \GV\Field The field implementation from configuration (\GV\GF_Field, \GV\Internal_Field). |
| 167 | 167 | */ |
| 168 | 168 | public static function from_configuration( $configuration ) { |
| 169 | - if ( empty( $configuration['id'] ) ) { |
|
| 169 | + if ( empty( $configuration[ 'id' ] ) ) { |
|
| 170 | 170 | $field = new self(); |
| 171 | 171 | gravityview()->log->error( 'Trying to get field from configuration without a field ID.', array( 'data' => $configuration ) ); |
| 172 | 172 | $field->update_configuration( $configuration ); |
@@ -179,8 +179,8 @@ discard block |
||
| 179 | 179 | } else { |
| 180 | 180 | $trace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); |
| 181 | 181 | } |
| 182 | - $trace = $trace[1]; |
|
| 183 | - if ( $trace['function'] == 'from_configuration' && $trace['class'] == __CLASS__ ) { |
|
| 182 | + $trace = $trace[ 1 ]; |
|
| 183 | + if ( $trace[ 'function' ] == 'from_configuration' && $trace[ 'class' ] == __CLASS__ ) { |
|
| 184 | 184 | $field = new self(); |
| 185 | 185 | gravityview()->log->error( 'Infinite loop protection tripped. Returning default class here.' ); |
| 186 | 186 | $field->update_configuration( $configuration ); |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** Determine the field implementation to use, and try to use. */ |
| 191 | - $field_class = is_numeric( $configuration['id'] ) ? '\GV\GF_Field' : '\GV\Internal_Field'; |
|
| 191 | + $field_class = is_numeric( $configuration[ 'id' ] ) ? '\GV\GF_Field' : '\GV\Internal_Field'; |
|
| 192 | 192 | |
| 193 | 193 | /** |
| 194 | 194 | * @filter `gravityview/field/class` Filter the field class about to be created from the configuration. |
@@ -227,24 +227,24 @@ discard block |
||
| 227 | 227 | public function update_configuration( $configuration ) { |
| 228 | 228 | $configuration = wp_parse_args( $configuration, $this->as_configuration() ); |
| 229 | 229 | |
| 230 | - if ( $this->ID != $configuration['id'] ) { |
|
| 230 | + if ( $this->ID != $configuration[ 'id' ] ) { |
|
| 231 | 231 | /** Smelling trouble here... */ |
| 232 | 232 | gravityview()->log->warning( 'ID is being changed for {field_class} instance, but implementation is not. Use ::from_configuration instead', array( 'field_class', __CLASS__ ) ); |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | - $this->ID = $configuration['id']; |
|
| 236 | - $this->label = $configuration['label']; |
|
| 237 | - $this->show_label = $configuration['show_label'] == '1'; |
|
| 238 | - $this->custom_label = $configuration['custom_label']; |
|
| 239 | - $this->custom_class = $configuration['custom_class']; |
|
| 240 | - $this->cap = $configuration['only_loggedin'] == '1' ? $configuration['only_loggedin_cap'] : ''; |
|
| 241 | - $this->search_filter = $configuration['search_filter'] == '1'; |
|
| 242 | - $this->show_as_link = $configuration['show_as_link'] == '1'; |
|
| 235 | + $this->ID = $configuration[ 'id' ]; |
|
| 236 | + $this->label = $configuration[ 'label' ]; |
|
| 237 | + $this->show_label = $configuration[ 'show_label' ] == '1'; |
|
| 238 | + $this->custom_label = $configuration[ 'custom_label' ]; |
|
| 239 | + $this->custom_class = $configuration[ 'custom_class' ]; |
|
| 240 | + $this->cap = $configuration[ 'only_loggedin' ] == '1' ? $configuration[ 'only_loggedin_cap' ] : ''; |
|
| 241 | + $this->search_filter = $configuration[ 'search_filter' ] == '1'; |
|
| 242 | + $this->show_as_link = $configuration[ 'show_as_link' ] == '1'; |
|
| 243 | 243 | |
| 244 | 244 | /** Shared among all field types (sort of). */ |
| 245 | 245 | $shared_configuration_keys = array( |
| 246 | 246 | 'id', 'label', 'show_label', 'custom_label', 'custom_class', |
| 247 | - 'only_loggedin' ,'only_loggedin_cap', 'search_filter', 'show_as_link', |
|
| 247 | + 'only_loggedin', 'only_loggedin_cap', 'search_filter', 'show_as_link', |
|
| 248 | 248 | ); |
| 249 | 249 | |
| 250 | 250 | /** Everything else goes into the properties for now. @todo subclasses! */ |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | public function get_label( View $view = null, Source $source = null, Entry $entry = null, Request $request = null ) { |
| 271 | 271 | /** A custom label is available. */ |
| 272 | 272 | if ( ! empty( $this->custom_label ) ) { |
| 273 | - return \GravityView_API::replace_variables( $this->custom_label, $source ? $source->form ? : null : null, $entry ? $entry->as_entry() : null ); |
|
| 273 | + return \GravityView_API::replace_variables( $this->custom_label, $source ? $source->form ?: null : null, $entry ? $entry->as_entry() : null ); |
|
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | return ''; |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | * @return mixed|null The value for the given configuration key, null if doesn't exist. |
| 348 | 348 | */ |
| 349 | 349 | public function __get( $key ) { |
| 350 | - switch( $key ): |
|
| 350 | + switch ( $key ): |
|
| 351 | 351 | default: |
| 352 | 352 | if ( isset( $this->configuration[ $key ] ) ) { |
| 353 | 353 | return $this->configuration[ $key ]; |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | * @return boolean Whether this $key is set or not. |
| 364 | 364 | */ |
| 365 | 365 | public function __isset( $key ) { |
| 366 | - switch( $key ): |
|
| 366 | + switch ( $key ): |
|
| 367 | 367 | default: |
| 368 | 368 | return isset( $this->configuration[ $key ] ); |
| 369 | 369 | endswitch; |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | do_action( 'gravityview_render_entry_' . $view->ID, $entry, $view, $request ); |
| 55 | 55 | |
| 56 | 56 | /** Entry does not belong to this view. */ |
| 57 | - if ( $view->form && $view->form->ID != $entry['form_id'] ) { |
|
| 57 | + if ( $view->form && $view->form->ID != $entry[ 'form_id' ] ) { |
|
| 58 | 58 | gravityview()->log->error( 'The requested entry does not belong to this view. Entry #{entry_id}, #View {view_id}', array( 'entry_id' => $entry->ID, 'view_id' => $view->ID ) ); |
| 59 | 59 | return null; |
| 60 | 60 | } |