@@ -116,14 +116,14 @@ discard block |
||
116 | 116 | // Call the custom API. |
117 | 117 | $response = wp_remote_post( self::url, array( |
118 | 118 | 'timeout' => 15, |
119 | - 'sslverify' => false, |
|
120 | - 'body' => array( |
|
121 | - 'edd_action' => 'check_license', |
|
122 | - 'license' => trim( $this->Addon->get_app_setting( 'license_key' ) ), |
|
123 | - 'item_name' => self::name, |
|
124 | - 'url' => home_url(), |
|
125 | - 'site_data' => $this->get_site_data(), |
|
126 | - ), |
|
119 | + 'sslverify' => false, |
|
120 | + 'body' => array( |
|
121 | + 'edd_action' => 'check_license', |
|
122 | + 'license' => trim( $this->Addon->get_app_setting( 'license_key' ) ), |
|
123 | + 'item_name' => self::name, |
|
124 | + 'url' => home_url(), |
|
125 | + 'site_data' => $this->get_site_data(), |
|
126 | + ), |
|
127 | 127 | )); |
128 | 128 | |
129 | 129 | // make sure the response came back okay |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | 'author' => self::author, |
386 | 386 | 'language' => get_locale(), |
387 | 387 | 'url' => home_url(), |
388 | - 'beta' => $this->Addon->get_app_setting( 'beta' ), |
|
388 | + 'beta' => $this->Addon->get_app_setting( 'beta' ), |
|
389 | 389 | ); |
390 | 390 | |
391 | 391 | if( !empty( $action ) ) { |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | // Update option with passed data license |
679 | 679 | $settings = $this->Addon->get_app_settings(); |
680 | 680 | |
681 | - $settings['license_key'] = $license_data->license_key = trim( $data['license'] ); |
|
681 | + $settings['license_key'] = $license_data->license_key = trim( $data['license'] ); |
|
682 | 682 | $settings['license_key_status'] = $license_data->license; |
683 | 683 | $settings['license_key_response'] = (array)$license_data; |
684 | 684 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | protected $script_handles = array( |
25 | 25 | 'rcp-admin-scripts', |
26 | - 'bbq', |
|
26 | + 'bbq', |
|
27 | 27 | ); |
28 | 28 | |
29 | 29 | /** |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | if( empty( $connected_views ) ) { |
138 | 138 | |
139 | - $menu_items['gravityview'] = array( |
|
139 | + $menu_items['gravityview'] = array( |
|
140 | 140 | 'label' => esc_attr__( 'Create a View', 'gravityview' ), |
141 | 141 | 'icon' => '<i class="fa fa-lg gv-icon-astronaut-head gv-icon"></i>', |
142 | 142 | 'title' => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ), |
@@ -167,13 +167,13 @@ discard block |
||
167 | 167 | // If there were no items added, then let's create the parent menu |
168 | 168 | if( $sub_menu_items ) { |
169 | 169 | |
170 | - $sub_menu_items[] = array( |
|
171 | - 'label' => esc_attr__( 'Create a View', 'gravityview' ), |
|
172 | - 'link_class' => 'gv-create-view', |
|
173 | - 'title' => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ), |
|
174 | - 'url' => admin_url( 'post-new.php?post_type=gravityview&form_id=' . $id ), |
|
175 | - 'capabilities' => array( 'edit_gravityviews' ), |
|
176 | - ); |
|
170 | + $sub_menu_items[] = array( |
|
171 | + 'label' => esc_attr__( 'Create a View', 'gravityview' ), |
|
172 | + 'link_class' => 'gv-create-view', |
|
173 | + 'title' => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ), |
|
174 | + 'url' => admin_url( 'post-new.php?post_type=gravityview&form_id=' . $id ), |
|
175 | + 'capabilities' => array( 'edit_gravityviews' ), |
|
176 | + ); |
|
177 | 177 | |
178 | 178 | // Make sure Gravity Forms uses the submenu; if there's only one item, it uses a link instead of a dropdown |
179 | 179 | $sub_menu_items[] = array( |
@@ -549,12 +549,12 @@ discard block |
||
549 | 549 | * Render html for displaying available fields based on a Form ID |
550 | 550 | * $blacklist_field_types - contains the field types which are not proper to be shown in a directory. |
551 | 551 | * |
552 | - * @see GravityView_Ajax::get_available_fields_html() Triggers `gravityview_render_available_fields` action |
|
552 | + * @see GravityView_Ajax::get_available_fields_html() Triggers `gravityview_render_available_fields` action |
|
553 | 553 | * @access public |
554 | - * |
|
554 | + * |
|
555 | 555 | * @param int $form Gravity Forms Form ID (default: '') |
556 | 556 | * @param string $context (default: 'single') |
557 | - * |
|
557 | + * |
|
558 | 558 | * @return void |
559 | 559 | */ |
560 | 560 | function render_available_fields( $form = 0, $context = 'single' ) { |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | |
569 | 569 | if ( ! is_array( $blacklist_field_types ) ) { |
570 | 570 | |
571 | - do_action( 'gravityview_log_error', __METHOD__ . ': $blacklist_field_types is not an array', print_r( $blacklist_field_types, true ) ); |
|
571 | + do_action( 'gravityview_log_error', __METHOD__ . ': $blacklist_field_types is not an array', print_r( $blacklist_field_types, true ) ); |
|
572 | 572 | |
573 | 573 | $blacklist_field_types = array(); |
574 | 574 | } |
@@ -700,12 +700,12 @@ discard block |
||
700 | 700 | /** |
701 | 701 | * @since 1.7.2 |
702 | 702 | */ |
703 | - 'other_entries' => array( |
|
704 | - 'label' => __('Other Entries', 'gravityview'), |
|
705 | - 'type' => 'other_entries', |
|
706 | - 'desc' => __('Display other entries created by the entry creator.', 'gravityview'), |
|
707 | - ), |
|
708 | - ); |
|
703 | + 'other_entries' => array( |
|
704 | + 'label' => __('Other Entries', 'gravityview'), |
|
705 | + 'type' => 'other_entries', |
|
706 | + 'desc' => __('Display other entries created by the entry creator.', 'gravityview'), |
|
707 | + ), |
|
708 | + ); |
|
709 | 709 | |
710 | 710 | if( 'single' !== $zone) { |
711 | 711 | |
@@ -1016,59 +1016,59 @@ discard block |
||
1016 | 1016 | |
1017 | 1017 | // Don't process any scripts below here if it's not a GravityView page. |
1018 | 1018 | if( ! gravityview_is_admin_page( $hook, 'single' ) && ! $is_widgets_page ) { |
1019 | - return; |
|
1019 | + return; |
|
1020 | 1020 | } |
1021 | 1021 | |
1022 | - wp_enqueue_script( 'jquery-ui-datepicker' ); |
|
1023 | - wp_enqueue_style( 'gravityview_views_datepicker', plugins_url('assets/css/admin-datepicker.css', GRAVITYVIEW_FILE), GravityView_Plugin::version ); |
|
1024 | - |
|
1025 | - $script_debug = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min'; |
|
1026 | - |
|
1027 | - //enqueue scripts |
|
1028 | - wp_enqueue_script( 'gravityview_views_scripts', plugins_url( 'assets/js/admin-views' . $script_debug . '.js', GRAVITYVIEW_FILE ), array( 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-ui-tooltip', 'jquery-ui-dialog', 'gravityview-jquery-cookie', 'jquery-ui-datepicker', 'underscore' ), GravityView_Plugin::version ); |
|
1029 | - |
|
1030 | - wp_localize_script('gravityview_views_scripts', 'gvGlobals', array( |
|
1031 | - 'cookiepath' => COOKIEPATH, |
|
1032 | - 'passed_form_id' => (bool) rgget( 'form_id' ), |
|
1033 | - 'nonce' => wp_create_nonce( 'gravityview_ajaxviews' ), |
|
1034 | - 'label_viewname' => __( 'Enter View name here', 'gravityview' ), |
|
1035 | - 'label_close' => __( 'Close', 'gravityview' ), |
|
1036 | - 'label_cancel' => __( 'Cancel', 'gravityview' ), |
|
1037 | - 'label_continue' => __( 'Continue', 'gravityview' ), |
|
1038 | - 'label_ok' => __( 'Ok', 'gravityview' ), |
|
1039 | - 'label_publisherror' => __( 'Error while creating the View for you. Check the settings or contact GravityView support.', 'gravityview' ), |
|
1040 | - 'loading_text' => esc_html__( 'Loading…', 'gravityview' ), |
|
1041 | - 'loading_error' => esc_html__( 'There was an error loading dynamic content.', 'gravityview' ), |
|
1042 | - 'field_loaderror' => __( 'Error while adding the field. Please try again or contact GravityView support.', 'gravityview' ), |
|
1043 | - 'remove_all_fields' => __( 'Would you like to remove all fields in this zone? (You are seeing this message because you were holding down the ALT key)', 'gravityview' ), |
|
1044 | - )); |
|
1045 | - |
|
1046 | - wp_enqueue_style( 'gravityview_views_styles', plugins_url( 'assets/css/admin-views.css', GRAVITYVIEW_FILE ), array('dashicons', 'wp-jquery-ui-dialog' ), GravityView_Plugin::version ); |
|
1047 | - |
|
1048 | - // Enqueue scripts needed for merge tags |
|
1049 | - self::enqueue_gravity_forms_scripts(); |
|
1022 | + wp_enqueue_script( 'jquery-ui-datepicker' ); |
|
1023 | + wp_enqueue_style( 'gravityview_views_datepicker', plugins_url('assets/css/admin-datepicker.css', GRAVITYVIEW_FILE), GravityView_Plugin::version ); |
|
1024 | + |
|
1025 | + $script_debug = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min'; |
|
1026 | + |
|
1027 | + //enqueue scripts |
|
1028 | + wp_enqueue_script( 'gravityview_views_scripts', plugins_url( 'assets/js/admin-views' . $script_debug . '.js', GRAVITYVIEW_FILE ), array( 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-ui-tooltip', 'jquery-ui-dialog', 'gravityview-jquery-cookie', 'jquery-ui-datepicker', 'underscore' ), GravityView_Plugin::version ); |
|
1029 | + |
|
1030 | + wp_localize_script('gravityview_views_scripts', 'gvGlobals', array( |
|
1031 | + 'cookiepath' => COOKIEPATH, |
|
1032 | + 'passed_form_id' => (bool) rgget( 'form_id' ), |
|
1033 | + 'nonce' => wp_create_nonce( 'gravityview_ajaxviews' ), |
|
1034 | + 'label_viewname' => __( 'Enter View name here', 'gravityview' ), |
|
1035 | + 'label_close' => __( 'Close', 'gravityview' ), |
|
1036 | + 'label_cancel' => __( 'Cancel', 'gravityview' ), |
|
1037 | + 'label_continue' => __( 'Continue', 'gravityview' ), |
|
1038 | + 'label_ok' => __( 'Ok', 'gravityview' ), |
|
1039 | + 'label_publisherror' => __( 'Error while creating the View for you. Check the settings or contact GravityView support.', 'gravityview' ), |
|
1040 | + 'loading_text' => esc_html__( 'Loading…', 'gravityview' ), |
|
1041 | + 'loading_error' => esc_html__( 'There was an error loading dynamic content.', 'gravityview' ), |
|
1042 | + 'field_loaderror' => __( 'Error while adding the field. Please try again or contact GravityView support.', 'gravityview' ), |
|
1043 | + 'remove_all_fields' => __( 'Would you like to remove all fields in this zone? (You are seeing this message because you were holding down the ALT key)', 'gravityview' ), |
|
1044 | + )); |
|
1045 | + |
|
1046 | + wp_enqueue_style( 'gravityview_views_styles', plugins_url( 'assets/css/admin-views.css', GRAVITYVIEW_FILE ), array('dashicons', 'wp-jquery-ui-dialog' ), GravityView_Plugin::version ); |
|
1047 | + |
|
1048 | + // Enqueue scripts needed for merge tags |
|
1049 | + self::enqueue_gravity_forms_scripts(); |
|
1050 | 1050 | } |
1051 | 1051 | |
1052 | 1052 | /** |
1053 | 1053 | * Enqueue Gravity Forms scripts, needed for Merge Tags |
1054 | - * |
|
1055 | - * @since 1.0.5-beta |
|
1056 | - * |
|
1057 | - * @return void |
|
1054 | + * |
|
1055 | + * @since 1.0.5-beta |
|
1056 | + * |
|
1057 | + * @return void |
|
1058 | 1058 | */ |
1059 | 1059 | static function enqueue_gravity_forms_scripts() { |
1060 | 1060 | GFForms::register_scripts(); |
1061 | 1061 | |
1062 | 1062 | $scripts = array( |
1063 | - 'sack', |
|
1064 | - 'gform_gravityforms', |
|
1065 | - 'gform_forms', |
|
1066 | - 'gform_form_admin', |
|
1067 | - 'jquery-ui-autocomplete' |
|
1063 | + 'sack', |
|
1064 | + 'gform_gravityforms', |
|
1065 | + 'gform_forms', |
|
1066 | + 'gform_form_admin', |
|
1067 | + 'jquery-ui-autocomplete' |
|
1068 | 1068 | ); |
1069 | 1069 | |
1070 | 1070 | if ( wp_is_mobile() ) { |
1071 | - $scripts[] = 'jquery-touch-punch'; |
|
1071 | + $scripts[] = 'jquery-touch-punch'; |
|
1072 | 1072 | } |
1073 | 1073 | |
1074 | 1074 | wp_enqueue_script( $scripts ); |
@@ -12,10 +12,10 @@ discard block |
||
12 | 12 | add_action( 'gravityview_log_debug', array( $this, 'log_debug'), 10, 2 ); |
13 | 13 | |
14 | 14 | // Enable debug with Gravity Forms Logging Add-on |
15 | - add_filter( 'gform_logging_supported', array( $this, 'enable_gform_logging' ) ); |
|
15 | + add_filter( 'gform_logging_supported', array( $this, 'enable_gform_logging' ) ); |
|
16 | 16 | |
17 | - // Load Debug Bar integration |
|
18 | - add_filter( 'debug_bar_panels', array( $this, 'add_debug_bar' ) ); |
|
17 | + // Load Debug Bar integration |
|
18 | + add_filter( 'debug_bar_panels', array( $this, 'add_debug_bar' ) ); |
|
19 | 19 | |
20 | 20 | } |
21 | 21 | |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | * @param array $supported_plugins List of plugins |
45 | 45 | */ |
46 | 46 | public function enable_gform_logging( $supported_plugins ) { |
47 | - $supported_plugins['gravityview'] = 'GravityView'; |
|
48 | - return $supported_plugins; |
|
47 | + $supported_plugins['gravityview'] = 'GravityView'; |
|
48 | + return $supported_plugins; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | |
97 | 97 | if ( class_exists("GFLogging") ) { |
98 | 98 | GFLogging::include_logger(); |
99 | - GFLogging::log_message( 'gravityview', $function( $message, true ) . $function($data, true), KLogger::DEBUG ); |
|
100 | - } |
|
99 | + GFLogging::log_message( 'gravityview', $function( $message, true ) . $function($data, true), KLogger::DEBUG ); |
|
100 | + } |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | static function log_error( $message = '', $data = null ) { |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | if ( class_exists("GFLogging") ) { |
118 | - GFLogging::include_logger(); |
|
119 | - GFLogging::log_message( 'gravityview', $function ( $message, true ) . $function ( $error, true), KLogger::ERROR ); |
|
118 | + GFLogging::include_logger(); |
|
119 | + GFLogging::log_message( 'gravityview', $function ( $message, true ) . $function ( $error, true), KLogger::ERROR ); |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 |
@@ -122,10 +122,10 @@ discard block |
||
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
125 | - * Uninstall all traces of GravityView |
|
126 | - * |
|
127 | - * Note: method is public because parent method is public |
|
128 | - * |
|
125 | + * Uninstall all traces of GravityView |
|
126 | + * |
|
127 | + * Note: method is public because parent method is public |
|
128 | + * |
|
129 | 129 | * @return bool |
130 | 130 | */ |
131 | 131 | public function uninstall() { |
@@ -137,53 +137,53 @@ discard block |
||
137 | 137 | $uninstaller->fire_everything(); |
138 | 138 | |
139 | 139 | /** |
140 | - * Set the path so that Gravity Forms can de-activate GravityView |
|
141 | - * @see GFAddOn::uninstall_addon |
|
142 | - * @uses deactivate_plugins() |
|
143 | - */ |
|
140 | + * Set the path so that Gravity Forms can de-activate GravityView |
|
141 | + * @see GFAddOn::uninstall_addon |
|
142 | + * @uses deactivate_plugins() |
|
143 | + */ |
|
144 | 144 | $this->_path = GRAVITYVIEW_FILE; |
145 | 145 | |
146 | 146 | return true; |
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
150 | - * Get an array of reasons why the plugin might be uninstalled |
|
151 | - * |
|
152 | - * @since 1.17.5 |
|
153 | - * |
|
150 | + * Get an array of reasons why the plugin might be uninstalled |
|
151 | + * |
|
152 | + * @since 1.17.5 |
|
153 | + * |
|
154 | 154 | * @return array Array of reasons with the label and followup questions for each uninstall reason |
155 | 155 | */ |
156 | 156 | private function get_uninstall_reasons() { |
157 | 157 | |
158 | 158 | $reasons = array( |
159 | 159 | 'will-continue' => array( |
160 | - 'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ), |
|
161 | - ), |
|
160 | + 'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ), |
|
161 | + ), |
|
162 | 162 | 'no-longer-need' => array( |
163 | - 'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ), |
|
164 | - ), |
|
163 | + 'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ), |
|
164 | + ), |
|
165 | 165 | 'doesnt-work' => array( |
166 | - 'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ), |
|
167 | - ), |
|
166 | + 'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ), |
|
167 | + ), |
|
168 | 168 | 'found-other' => array( |
169 | - 'label' => esc_html__( 'I found a better plugin', 'gravityview' ), |
|
170 | - 'followup' => esc_attr__('What plugin you are using, and why?', 'gravityview'), |
|
171 | - ), |
|
169 | + 'label' => esc_html__( 'I found a better plugin', 'gravityview' ), |
|
170 | + 'followup' => esc_attr__('What plugin you are using, and why?', 'gravityview'), |
|
171 | + ), |
|
172 | 172 | 'other' => array( |
173 | - 'label' => esc_html__( 'Other', 'gravityview' ), |
|
174 | - ), |
|
173 | + 'label' => esc_html__( 'Other', 'gravityview' ), |
|
174 | + ), |
|
175 | 175 | ); |
176 | 176 | |
177 | 177 | shuffle( $reasons ); |
178 | 178 | |
179 | 179 | return $reasons; |
180 | - } |
|
180 | + } |
|
181 | 181 | |
182 | 182 | /** |
183 | - * Display a feedback form when the plugin is uninstalled |
|
184 | - * |
|
185 | - * @since 1.17.5 |
|
186 | - * |
|
183 | + * Display a feedback form when the plugin is uninstalled |
|
184 | + * |
|
185 | + * @since 1.17.5 |
|
186 | + * |
|
187 | 187 | * @return string HTML of the uninstallation form |
188 | 188 | */ |
189 | 189 | public function uninstall_form() { |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | <h2><?php esc_html_e( 'Why did you uninstall GravityView?', 'gravityview' ); ?></h2> |
264 | 264 | <ul> |
265 | 265 | <?php |
266 | - $reasons = $this->get_uninstall_reasons(); |
|
266 | + $reasons = $this->get_uninstall_reasons(); |
|
267 | 267 | foreach ( $reasons as $reason ) { |
268 | 268 | printf( '<li><label><input name="reason" type="radio" value="other" data-followup="%s"> %s</label></li>', rgar( $reason, 'followup' ), rgar( $reason, 'label' ) ); |
269 | 269 | } |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | $license_key = self::getSetting('license_key'); |
427 | 427 | if( '' === $license_key ) { |
428 | 428 | $license_status = 'inactive'; |
429 | - } |
|
429 | + } |
|
430 | 430 | $license_id = empty( $license_key ) ? 'license' : $license_key; |
431 | 431 | |
432 | 432 | $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'); |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | $update_below = false; |
442 | 442 | $primary_button_link = admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ); |
443 | 443 | |
444 | - switch ( $license_status ) { |
|
444 | + switch ( $license_status ) { |
|
445 | 445 | /** @since 1.17 */ |
446 | 446 | case 'expired': |
447 | 447 | $title = __('Expired License', 'gravityview'); |
@@ -487,12 +487,12 @@ discard block |
||
487 | 487 | } |
488 | 488 | |
489 | 489 | /** |
490 | - * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
491 | - * |
|
492 | - * @since 1.21.5 |
|
493 | - * |
|
494 | - * @see GFAddOn::scripts() |
|
495 | - * |
|
490 | + * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
491 | + * |
|
492 | + * @since 1.21.5 |
|
493 | + * |
|
494 | + * @see GFAddOn::scripts() |
|
495 | + * |
|
496 | 496 | * @return array Array of scripts |
497 | 497 | */ |
498 | 498 | public function scripts() { |
@@ -501,10 +501,10 @@ discard block |
||
501 | 501 | $scripts[] = array( |
502 | 502 | 'handle' => 'gform_tooltip_init', |
503 | 503 | 'enqueue' => array( |
504 | - array( |
|
505 | - 'admin_page' => array( 'app_settings' ) |
|
506 | - ) |
|
507 | - ) |
|
504 | + array( |
|
505 | + 'admin_page' => array( 'app_settings' ) |
|
506 | + ) |
|
507 | + ) |
|
508 | 508 | ); |
509 | 509 | |
510 | 510 | return $scripts; |
@@ -523,10 +523,10 @@ discard block |
||
523 | 523 | 'src' => plugins_url( 'assets/css/admin-settings.css', GRAVITYVIEW_FILE ), |
524 | 524 | 'version' => GravityView_Plugin::version, |
525 | 525 | "deps" => array( |
526 | - 'gform_admin', |
|
526 | + 'gform_admin', |
|
527 | 527 | 'gaddon_form_settings_css', |
528 | - 'gform_tooltip', |
|
529 | - 'gform_font_awesome', |
|
528 | + 'gform_tooltip', |
|
529 | + 'gform_font_awesome', |
|
530 | 530 | ), |
531 | 531 | 'enqueue' => array( |
532 | 532 | array( 'admin_page' => array( |
@@ -592,12 +592,12 @@ discard block |
||
592 | 592 | } |
593 | 593 | |
594 | 594 | public function app_settings_tab() { |
595 | - parent::app_settings_tab(); |
|
595 | + parent::app_settings_tab(); |
|
596 | 596 | |
597 | 597 | if ( $this->maybe_uninstall() ) { |
598 | - echo $this->uninstall_form(); |
|
598 | + echo $this->uninstall_form(); |
|
599 | 599 | } |
600 | - } |
|
600 | + } |
|
601 | 601 | |
602 | 602 | /** |
603 | 603 | * Make protected public |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | */ |
634 | 634 | public function get_app_settings() { |
635 | 635 | |
636 | - $settings = get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', $this->get_default_settings() ); |
|
636 | + $settings = get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', $this->get_default_settings() ); |
|
637 | 637 | |
638 | 638 | if( defined( 'GRAVITYVIEW_LICENSE_KEY' ) ) { |
639 | 639 | $settings['license_key'] = GRAVITYVIEW_LICENSE_KEY; |
@@ -674,9 +674,9 @@ discard block |
||
674 | 674 | */ |
675 | 675 | protected function settings_edd_license( $field, $echo = true ) { |
676 | 676 | |
677 | - if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
|
678 | - $field['input_type'] = 'password'; |
|
679 | - } |
|
677 | + if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
|
678 | + $field['input_type'] = 'password'; |
|
679 | + } |
|
680 | 680 | |
681 | 681 | $text = $this->settings_text( $field, false ); |
682 | 682 | |
@@ -731,8 +731,8 @@ discard block |
||
731 | 731 | type="' . $field['type'] . '" |
732 | 732 | name="' . esc_attr( $name ) . '" |
733 | 733 | value="' . $value . '" ' . |
734 | - implode( ' ', $attributes ) . |
|
735 | - ' />'; |
|
734 | + implode( ' ', $attributes ) . |
|
735 | + ' />'; |
|
736 | 736 | |
737 | 737 | if ( $echo ) { |
738 | 738 | echo $html; |
@@ -773,19 +773,19 @@ discard block |
||
773 | 773 | |
774 | 774 | |
775 | 775 | /** |
776 | - * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it |
|
777 | - * |
|
778 | - * Converts `$field['description']` to `$field['gv_description']` |
|
779 | - * Converts `$field['subtitle']` to `$field['description']` |
|
780 | - * |
|
781 | - * @see GravityView_Settings::single_setting_label Converts `gv_description` back to `description` |
|
782 | - * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description |
|
783 | - * |
|
784 | - * @since 1.21.5.2 |
|
785 | - * |
|
776 | + * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it |
|
777 | + * |
|
778 | + * Converts `$field['description']` to `$field['gv_description']` |
|
779 | + * Converts `$field['subtitle']` to `$field['description']` |
|
780 | + * |
|
781 | + * @see GravityView_Settings::single_setting_label Converts `gv_description` back to `description` |
|
782 | + * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description |
|
783 | + * |
|
784 | + * @since 1.21.5.2 |
|
785 | + * |
|
786 | 786 | * @param array $field |
787 | - * |
|
788 | - * @return void |
|
787 | + * |
|
788 | + * @return void |
|
789 | 789 | */ |
790 | 790 | public function single_setting_row( $field ) { |
791 | 791 | |
@@ -980,7 +980,7 @@ discard block |
||
980 | 980 | array( |
981 | 981 | 'label' => _x('Show me beta versions if they are available.', 'gravityview'), |
982 | 982 | 'value' => '1', |
983 | - 'name' => 'beta', |
|
983 | + 'name' => 'beta', |
|
984 | 984 | ), |
985 | 985 | ), |
986 | 986 | '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'), |
@@ -1005,39 +1005,39 @@ discard block |
||
1005 | 1005 | |
1006 | 1006 | if( empty( $field['disabled'] ) ) { |
1007 | 1007 | unset( $field['disabled'] ); |
1008 | - } |
|
1008 | + } |
|
1009 | 1009 | } |
1010 | 1010 | |
1011 | - $sections = array( |
|
1012 | - array( |
|
1013 | - 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __('You are running GravityView version %s', 'gravityview'), GravityView_Plugin::version ) ), |
|
1014 | - 'fields' => $fields, |
|
1015 | - ) |
|
1016 | - ); |
|
1011 | + $sections = array( |
|
1012 | + array( |
|
1013 | + 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __('You are running GravityView version %s', 'gravityview'), GravityView_Plugin::version ) ), |
|
1014 | + 'fields' => $fields, |
|
1015 | + ) |
|
1016 | + ); |
|
1017 | 1017 | |
1018 | - // custom 'update settings' button |
|
1019 | - $button = array( |
|
1020 | - 'class' => 'button button-primary button-hero', |
|
1021 | - 'type' => 'save', |
|
1022 | - ); |
|
1018 | + // custom 'update settings' button |
|
1019 | + $button = array( |
|
1020 | + 'class' => 'button button-primary button-hero', |
|
1021 | + 'type' => 'save', |
|
1022 | + ); |
|
1023 | 1023 | |
1024 | 1024 | if( $disabled_attribute ) { |
1025 | 1025 | $button['disabled'] = $disabled_attribute; |
1026 | 1026 | } |
1027 | 1027 | |
1028 | 1028 | |
1029 | - /** |
|
1030 | - * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
1031 | - * Extensions can tap in here to insert their own section and settings. |
|
1032 | - * <code> |
|
1033 | - * $sections[] = array( |
|
1034 | - * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
1035 | - * 'fields' => $settings, |
|
1036 | - * ); |
|
1037 | - * </code> |
|
1038 | - * @param array $extension_settings Empty array, ready for extension settings! |
|
1039 | - */ |
|
1040 | - $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
1029 | + /** |
|
1030 | + * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
1031 | + * Extensions can tap in here to insert their own section and settings. |
|
1032 | + * <code> |
|
1033 | + * $sections[] = array( |
|
1034 | + * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
1035 | + * 'fields' => $settings, |
|
1036 | + * ); |
|
1037 | + * </code> |
|
1038 | + * @param array $extension_settings Empty array, ready for extension settings! |
|
1039 | + */ |
|
1040 | + $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
1041 | 1041 | |
1042 | 1042 | // If there are extensions, add a section for them |
1043 | 1043 | if ( ! empty( $extension_sections ) ) { |
@@ -1050,13 +1050,13 @@ discard block |
||
1050 | 1050 | } |
1051 | 1051 | } |
1052 | 1052 | |
1053 | - $k = count( $extension_sections ) - 1 ; |
|
1054 | - $extension_sections[ $k ]['fields'][] = $button; |
|
1053 | + $k = count( $extension_sections ) - 1 ; |
|
1054 | + $extension_sections[ $k ]['fields'][] = $button; |
|
1055 | 1055 | $sections = array_merge( $sections, $extension_sections ); |
1056 | 1056 | } else { |
1057 | - // add the 'update settings' button to the general section |
|
1058 | - $sections[0]['fields'][] = $button; |
|
1059 | - } |
|
1057 | + // add the 'update settings' button to the general section |
|
1058 | + $sections[0]['fields'][] = $button; |
|
1059 | + } |
|
1060 | 1060 | |
1061 | 1061 | return $sections; |
1062 | 1062 | } |
@@ -169,10 +169,10 @@ discard block |
||
169 | 169 | |
170 | 170 | if( 'gv_note_add' === $_POST['action'] ) { |
171 | 171 | |
172 | - if( ! GVCommon::has_cap( 'gravityview_add_entry_notes' ) ) { |
|
173 | - do_action( 'gravityview_log_error', __METHOD__ . ': The user isnt allowed to add entry notes.' ); |
|
174 | - return; |
|
175 | - } |
|
172 | + if( ! GVCommon::has_cap( 'gravityview_add_entry_notes' ) ) { |
|
173 | + do_action( 'gravityview_log_error', __METHOD__ . ': The user isnt allowed to add entry notes.' ); |
|
174 | + return; |
|
175 | + } |
|
176 | 176 | |
177 | 177 | $post = wp_unslash( $_POST ); |
178 | 178 | |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | * |
273 | 273 | * Verify permissions. Check expected $_POST. Parse args, then send to process_delete_notes |
274 | 274 | * |
275 | - * @since 1.17 |
|
275 | + * @since 1.17 |
|
276 | 276 | * |
277 | 277 | * @see process_delete_notes |
278 | 278 | * |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | 'subject-label' => __( 'Subject', 'gravityview' ), |
426 | 426 | 'subject' => __( 'Email subject', 'gravityview' ), |
427 | 427 | 'default-email-subject' => __( 'New entry note', 'gravityview' ), |
428 | - 'email-footer' => __( 'This note was sent from {url}', 'gravityview' ), |
|
428 | + 'email-footer' => __( 'This note was sent from {url}', 'gravityview' ), |
|
429 | 429 | 'also-email' => __( 'Also email this note to', 'gravityview' ), |
430 | 430 | 'error-add-note' => __( 'There was an error adding the note.', 'gravityview' ), |
431 | 431 | 'error-invalid' => __( 'The request was invalid. Refresh the page and try again.', 'gravityview' ), |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | 'gv-note-to-custom' => '', |
718 | 718 | 'gv-note-subject' => '', |
719 | 719 | 'gv-note-content' => '', |
720 | - 'current-url' => '', |
|
720 | + 'current-url' => '', |
|
721 | 721 | ); |
722 | 722 | |
723 | 723 | $current_user = wp_get_current_user(); |
@@ -769,9 +769,9 @@ discard block |
||
769 | 769 | $message .= $this->get_email_footer( $email_footer, $is_html, $email_data ); |
770 | 770 | |
771 | 771 | /** |
772 | - * @filter `gravityview/field/notes/wpautop_email` Should the message content have paragraphs added automatically, if using HTML message format |
|
772 | + * @filter `gravityview/field/notes/wpautop_email` Should the message content have paragraphs added automatically, if using HTML message format |
|
773 | 773 | * @since 1.18 |
774 | - * @param bool $wpautop_email True: Apply wpautop() to the email message if using; False: Leave as entered (Default: true) |
|
774 | + * @param bool $wpautop_email True: Apply wpautop() to the email message if using; False: Leave as entered (Default: true) |
|
775 | 775 | */ |
776 | 776 | $wpautop_email = apply_filters( 'gravityview/field/notes/wpautop_email', true ); |
777 | 777 | |
@@ -791,12 +791,12 @@ discard block |
||
791 | 791 | } |
792 | 792 | |
793 | 793 | /** |
794 | - * Get the footer for Entry Note emails |
|
795 | - * |
|
796 | - * `{url}` is replaced by the URL of the page where the note form was embedded |
|
797 | - * |
|
798 | - * @since 1.18 |
|
799 | - * @see GravityView_Field_Notes::strings The default value of $message_footer is set here, with the key 'email-footer' |
|
794 | + * Get the footer for Entry Note emails |
|
795 | + * |
|
796 | + * `{url}` is replaced by the URL of the page where the note form was embedded |
|
797 | + * |
|
798 | + * @since 1.18 |
|
799 | + * @see GravityView_Field_Notes::strings The default value of $message_footer is set here, with the key 'email-footer' |
|
800 | 800 | * |
801 | 801 | * @param string $email_footer The message footer value |
802 | 802 | * @param bool $is_html True: Email is being sent as HTML; False: sent as text |
@@ -805,10 +805,10 @@ discard block |
||
805 | 805 | */ |
806 | 806 | private function get_email_footer( $email_footer = '', $is_html = true, $email_data = array() ) { |
807 | 807 | |
808 | - $output = ''; |
|
808 | + $output = ''; |
|
809 | 809 | |
810 | 810 | if( ! empty( $email_footer ) ) { |
811 | - $url = rgar( $email_data, 'current-url' ); |
|
811 | + $url = rgar( $email_data, 'current-url' ); |
|
812 | 812 | $url = html_entity_decode( $url ); |
813 | 813 | $url = site_url( $url ); |
814 | 814 |