@@ -105,8 +105,8 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | - * When on the Installer page, show a different notice than on the Settings page |
|
| 109 | - * |
|
| 108 | + * When on the Installer page, show a different notice than on the Settings page |
|
| 109 | + * |
|
| 110 | 110 | * @param array $notice |
| 111 | 111 | * |
| 112 | 112 | * @return string License notice |
@@ -114,10 +114,10 @@ discard block |
||
| 114 | 114 | public function maybe_modify_license_notice( $notice = '' ) { |
| 115 | 115 | |
| 116 | 116 | if ( ! gravityview()->request->is_admin( '', 'extensions' ) ) { |
| 117 | - return $notice; |
|
| 118 | - } |
|
| 117 | + return $notice; |
|
| 118 | + } |
|
| 119 | 119 | |
| 120 | - return esc_html__( 'Your license %s. Do you want access to these plugins? %sActivate your license%s or %sget a license here%s.', 'gravityview' ); |
|
| 120 | + return esc_html__( 'Your license %s. Do you want access to these plugins? %sActivate your license%s or %sget a license here%s.', 'gravityview' ); |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
@@ -155,43 +155,43 @@ discard block |
||
| 155 | 155 | * Get extensions data from transient or from API; save transient after getting data from API |
| 156 | 156 | * |
| 157 | 157 | * @return array { |
| 158 | - * @type array $info { |
|
| 159 | - * @type string $id int 17 |
|
| 160 | - * @type string $slug Extension slug |
|
| 161 | - * @type string $title Extension title |
|
| 162 | - * @type string $create_date in '2018-07-19 20:03:10' format |
|
| 163 | - * @type string $modified_date |
|
| 164 | - * @type string $status |
|
| 165 | - * @type string $link URL to public plugin page |
|
| 166 | - * @type string $content |
|
| 167 | - * @type string $excerpt |
|
| 168 | - * @type string $thumbnail URL to thumbnail |
|
| 169 | - * @type array $category Taxonomy details for the plugin's category { |
|
| 170 | - * @type int $term_id => int 30 |
|
| 171 | - * @type string $name => string 'Plugins' (length=7) |
|
| 172 | - * @type string $slug => string 'plugins' (length=7) |
|
| 173 | - * @type int $term_group => int 0 |
|
| 174 | - * @type int $term_taxonomy_id => int 30 |
|
| 175 | - * @type string $taxonomy => string 'download_category' (length=17) |
|
| 176 | - * @type string $description => string '' (length=0) |
|
| 177 | - * @type int $parent => int 0 |
|
| 178 | - * @type int $count => int 4 |
|
| 179 | - * @type string $filter => string 'raw' (length=3) |
|
| 180 | - * } |
|
| 181 | - * @type array $tags {see $category above} |
|
| 182 | - * @type string $textdomain string 'gravityview' (length=11) |
|
| 183 | - * } |
|
| 184 | - * @type array $pricing array of `price_name_slugs` => '00.00' values, if price options exist |
|
| 185 | - * @type array $licensing { |
|
| 186 | - * @type bool $enabled Is licensing enabled for the extension |
|
| 187 | - * @type string $version Version number |
|
| 188 | - * @type string $exp_unit Expiration unit ('years') |
|
| 189 | - * @type string $exp_length Expiration length ('1') |
|
| 190 | - * } |
|
| 191 | - * @type array $files Array of files. Empty if user has no access to the file. { |
|
| 192 | - * @type string $file string URL of the file download |
|
| 193 | - * } |
|
| 194 | - * } |
|
| 158 | + * @type array $info { |
|
| 159 | + * @type string $id int 17 |
|
| 160 | + * @type string $slug Extension slug |
|
| 161 | + * @type string $title Extension title |
|
| 162 | + * @type string $create_date in '2018-07-19 20:03:10' format |
|
| 163 | + * @type string $modified_date |
|
| 164 | + * @type string $status |
|
| 165 | + * @type string $link URL to public plugin page |
|
| 166 | + * @type string $content |
|
| 167 | + * @type string $excerpt |
|
| 168 | + * @type string $thumbnail URL to thumbnail |
|
| 169 | + * @type array $category Taxonomy details for the plugin's category { |
|
| 170 | + * @type int $term_id => int 30 |
|
| 171 | + * @type string $name => string 'Plugins' (length=7) |
|
| 172 | + * @type string $slug => string 'plugins' (length=7) |
|
| 173 | + * @type int $term_group => int 0 |
|
| 174 | + * @type int $term_taxonomy_id => int 30 |
|
| 175 | + * @type string $taxonomy => string 'download_category' (length=17) |
|
| 176 | + * @type string $description => string '' (length=0) |
|
| 177 | + * @type int $parent => int 0 |
|
| 178 | + * @type int $count => int 4 |
|
| 179 | + * @type string $filter => string 'raw' (length=3) |
|
| 180 | + * } |
|
| 181 | + * @type array $tags {see $category above} |
|
| 182 | + * @type string $textdomain string 'gravityview' (length=11) |
|
| 183 | + * } |
|
| 184 | + * @type array $pricing array of `price_name_slugs` => '00.00' values, if price options exist |
|
| 185 | + * @type array $licensing { |
|
| 186 | + * @type bool $enabled Is licensing enabled for the extension |
|
| 187 | + * @type string $version Version number |
|
| 188 | + * @type string $exp_unit Expiration unit ('years') |
|
| 189 | + * @type string $exp_length Expiration length ('1') |
|
| 190 | + * } |
|
| 191 | + * @type array $files Array of files. Empty if user has no access to the file. { |
|
| 192 | + * @type string $file string URL of the file download |
|
| 193 | + * } |
|
| 194 | + * } |
|
| 195 | 195 | */ |
| 196 | 196 | public function get_extensions_data() { |
| 197 | 197 | |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | ) ); |
| 220 | 220 | |
| 221 | 221 | if ( is_wp_error( $response ) ) { |
| 222 | - gravityview()->log->error( "Extension data response is an error", array( 'data' => $response ) ); |
|
| 222 | + gravityview()->log->error( "Extension data response is an error", array( 'data' => $response ) ); |
|
| 223 | 223 | return array(); |
| 224 | 224 | } |
| 225 | 225 | |
@@ -326,13 +326,13 @@ discard block |
||
| 326 | 326 | protected function render_extension( $extension, $wp_plugins ) { |
| 327 | 327 | |
| 328 | 328 | $extension_info = wp_parse_args( (array) $extension['info'], array( |
| 329 | - 'thumbnail' => '', |
|
| 330 | - 'title' => '', |
|
| 331 | - 'textdomain' => '', |
|
| 332 | - 'slug' => '', |
|
| 333 | - 'excerpt' => '', |
|
| 334 | - 'link' => '', |
|
| 335 | - ) ); |
|
| 329 | + 'thumbnail' => '', |
|
| 330 | + 'title' => '', |
|
| 331 | + 'textdomain' => '', |
|
| 332 | + 'slug' => '', |
|
| 333 | + 'excerpt' => '', |
|
| 334 | + 'link' => '', |
|
| 335 | + ) ); |
|
| 336 | 336 | |
| 337 | 337 | |
| 338 | 338 | $wp_plugin = \GV\Utils::get( $wp_plugins, $extension_info['textdomain'], false ); |
@@ -346,13 +346,13 @@ discard block |
||
| 346 | 346 | $base_price = $this->get_extension_base_price( $extension ); |
| 347 | 347 | |
| 348 | 348 | switch( gravityview()->plugin->settings->get( 'license_key_response/license' ) ) { |
| 349 | - case 'active': |
|
| 349 | + case 'active': |
|
| 350 | 350 | case 'valid': |
| 351 | - break; |
|
| 352 | - default: |
|
| 353 | - $button_class = 'disabled disabled-license'; |
|
| 354 | - $button_title = __( 'An active license is required.', 'gravityview' ); |
|
| 355 | - break; |
|
| 351 | + break; |
|
| 352 | + default: |
|
| 353 | + $button_class = 'disabled disabled-license'; |
|
| 354 | + $button_title = __( 'An active license is required.', 'gravityview' ); |
|
| 355 | + break; |
|
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | // If it's available to purchase, and they don't have access |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | } else if ( ! $has_access ) { |
| 367 | 367 | $spinner = false; |
| 368 | 368 | $status_label = ''; |
| 369 | - $galactic_only = in_array( \GV\Utils::get( $extension, 'info/category/0/slug' ), array( 'plugins', 'views' ) ); |
|
| 369 | + $galactic_only = in_array( \GV\Utils::get( $extension, 'info/category/0/slug' ), array( 'plugins', 'views' ) ); |
|
| 370 | 370 | $license = $galactic_only ? __( 'Galactic', 'gravityview' ) : __( 'Interstellar', 'gravityview' ); |
| 371 | 371 | $button_label = sprintf( __( 'Upgrade to %s for Access', 'gravityview' ), $license ); |
| 372 | 372 | $button_class = 'button-primary button-large'; |
@@ -429,15 +429,15 @@ discard block |
||
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | /** |
| 432 | - * Returns the base price for an extension |
|
| 433 | - * |
|
| 432 | + * Returns the base price for an extension |
|
| 433 | + * |
|
| 434 | 434 | * @param array $extension |
| 435 | 435 | * |
| 436 | 436 | * @return float Base price for an extension. If not for sale separately, returns 0 |
| 437 | 437 | */ |
| 438 | 438 | private function get_extension_base_price( $extension ) { |
| 439 | 439 | |
| 440 | - $base_price = \GV\Utils::get( $extension, 'pricing/amount', 0 ); |
|
| 440 | + $base_price = \GV\Utils::get( $extension, 'pricing/amount', 0 ); |
|
| 441 | 441 | $base_price = \GFCommon::to_number( $base_price ); |
| 442 | 442 | |
| 443 | 443 | unset( $extension['pricing']['amount'] ); |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 450 | return floatval( $base_price ); |
| 451 | - } |
|
| 451 | + } |
|
| 452 | 452 | |
| 453 | 453 | /** |
| 454 | 454 | * Handle AJAX request to activate extension |
@@ -134,28 +134,28 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function add_network_menu() { |
| 136 | 136 | |
| 137 | - if ( ! gravityview()->plugin->is_network_activated() ) { |
|
| 137 | + if ( ! gravityview()->plugin->is_network_activated() ) { |
|
| 138 | 138 | return; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - add_menu_page( __( 'Settings', 'gravityview' ), __( 'GravityView', 'gravityview' ), $this->_capabilities_app_settings, "{$this->_slug}_settings", array( $this, 'app_tab_page' ), 'none' ); |
|
| 141 | + add_menu_page( __( 'Settings', 'gravityview' ), __( 'GravityView', 'gravityview' ), $this->_capabilities_app_settings, "{$this->_slug}_settings", array( $this, 'app_tab_page' ), 'none' ); |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | /** |
| 145 | - * Uninstall all traces of GravityView |
|
| 146 | - * |
|
| 147 | - * Note: method is public because parent method is public |
|
| 148 | - * |
|
| 145 | + * Uninstall all traces of GravityView |
|
| 146 | + * |
|
| 147 | + * Note: method is public because parent method is public |
|
| 148 | + * |
|
| 149 | 149 | * @return bool |
| 150 | 150 | */ |
| 151 | 151 | public function uninstall() { |
| 152 | 152 | gravityview()->plugin->uninstall(); |
| 153 | 153 | |
| 154 | 154 | /** |
| 155 | - * Set the path so that Gravity Forms can de-activate GravityView |
|
| 156 | - * @see GFAddOn::uninstall_addon |
|
| 157 | - * @uses deactivate_plugins() |
|
| 158 | - */ |
|
| 155 | + * Set the path so that Gravity Forms can de-activate GravityView |
|
| 156 | + * @see GFAddOn::uninstall_addon |
|
| 157 | + * @uses deactivate_plugins() |
|
| 158 | + */ |
|
| 159 | 159 | $this->_path = GRAVITYVIEW_FILE; |
| 160 | 160 | |
| 161 | 161 | return true; |
@@ -185,42 +185,42 @@ discard block |
||
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |
| 188 | - * Get an array of reasons why the plugin might be uninstalled |
|
| 189 | - * |
|
| 190 | - * @since 1.17.5 |
|
| 191 | - * |
|
| 188 | + * Get an array of reasons why the plugin might be uninstalled |
|
| 189 | + * |
|
| 190 | + * @since 1.17.5 |
|
| 191 | + * |
|
| 192 | 192 | * @return array Array of reasons with the label and followup questions for each uninstall reason |
| 193 | 193 | */ |
| 194 | 194 | private function get_uninstall_reasons() { |
| 195 | 195 | $reasons = array( |
| 196 | 196 | 'will-continue' => array( |
| 197 | - 'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ), |
|
| 198 | - ), |
|
| 197 | + 'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ), |
|
| 198 | + ), |
|
| 199 | 199 | 'no-longer-need' => array( |
| 200 | - 'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ), |
|
| 201 | - ), |
|
| 200 | + 'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ), |
|
| 201 | + ), |
|
| 202 | 202 | 'doesnt-work' => array( |
| 203 | - 'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ), |
|
| 204 | - ), |
|
| 203 | + 'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ), |
|
| 204 | + ), |
|
| 205 | 205 | 'found-other' => array( |
| 206 | - 'label' => esc_html__( 'I found a better plugin', 'gravityview' ), |
|
| 207 | - 'followup' => esc_attr__( 'What plugin you are using, and why?', 'gravityview' ), |
|
| 208 | - ), |
|
| 206 | + 'label' => esc_html__( 'I found a better plugin', 'gravityview' ), |
|
| 207 | + 'followup' => esc_attr__( 'What plugin you are using, and why?', 'gravityview' ), |
|
| 208 | + ), |
|
| 209 | 209 | 'other' => array( |
| 210 | - 'label' => esc_html__( 'Other', 'gravityview' ), |
|
| 211 | - ), |
|
| 210 | + 'label' => esc_html__( 'Other', 'gravityview' ), |
|
| 211 | + ), |
|
| 212 | 212 | ); |
| 213 | 213 | |
| 214 | 214 | shuffle( $reasons ); |
| 215 | 215 | |
| 216 | 216 | return $reasons; |
| 217 | - } |
|
| 217 | + } |
|
| 218 | 218 | |
| 219 | 219 | /** |
| 220 | - * Display a feedback form when the plugin is uninstalled |
|
| 221 | - * |
|
| 222 | - * @since 1.17.5 |
|
| 223 | - * |
|
| 220 | + * Display a feedback form when the plugin is uninstalled |
|
| 221 | + * |
|
| 222 | + * @since 1.17.5 |
|
| 223 | + * |
|
| 224 | 224 | * @return string HTML of the uninstallation form |
| 225 | 225 | */ |
| 226 | 226 | public function uninstall_form() { |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | <h2><?php esc_html_e( 'Why did you uninstall GravityView?', 'gravityview' ); ?></h2> |
| 301 | 301 | <ul> |
| 302 | 302 | <?php |
| 303 | - $reasons = $this->get_uninstall_reasons(); |
|
| 303 | + $reasons = $this->get_uninstall_reasons(); |
|
| 304 | 304 | foreach ( $reasons as $reason ) { |
| 305 | 305 | printf( '<li><label><input name="reason" type="radio" value="other" data-followup="%s"> %s</label></li>', Utils::get( $reason, 'followup' ), Utils::get( $reason, 'label' ) ); |
| 306 | 306 | } |
@@ -394,12 +394,12 @@ discard block |
||
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | public function app_settings_tab() { |
| 397 | - parent::app_settings_tab(); |
|
| 397 | + parent::app_settings_tab(); |
|
| 398 | 398 | |
| 399 | 399 | if ( $this->maybe_uninstall() ) { |
| 400 | - echo $this->uninstall_form(); |
|
| 400 | + echo $this->uninstall_form(); |
|
| 401 | 401 | } |
| 402 | - } |
|
| 402 | + } |
|
| 403 | 403 | |
| 404 | 404 | /** |
| 405 | 405 | * The Settings title |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | * @return array The settings. |
| 485 | 485 | */ |
| 486 | 486 | public function all() { |
| 487 | - return wp_parse_args( get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', array() ), $this->defaults() ); |
|
| 487 | + return wp_parse_args( get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', array() ), $this->defaults() ); |
|
| 488 | 488 | } |
| 489 | 489 | |
| 490 | 490 | /** |
@@ -553,8 +553,8 @@ discard block |
||
| 553 | 553 | type="' . $field['type'] . '" |
| 554 | 554 | name="' . esc_attr( $name ) . '" |
| 555 | 555 | value="' . $value . '" ' . |
| 556 | - implode( ' ', $attributes ) . |
|
| 557 | - ' />'; |
|
| 556 | + implode( ' ', $attributes ) . |
|
| 557 | + ' />'; |
|
| 558 | 558 | |
| 559 | 559 | if ( $echo ) { |
| 560 | 560 | echo $html; |
@@ -572,12 +572,12 @@ discard block |
||
| 572 | 572 | } |
| 573 | 573 | |
| 574 | 574 | /** |
| 575 | - * Check whether GravityView is being saved |
|
| 576 | - * |
|
| 577 | - * The generic is_save_postback() is true for all addons |
|
| 578 | - * |
|
| 579 | - * @since 2.0.8 |
|
| 580 | - * |
|
| 575 | + * Check whether GravityView is being saved |
|
| 576 | + * |
|
| 577 | + * The generic is_save_postback() is true for all addons |
|
| 578 | + * |
|
| 579 | + * @since 2.0.8 |
|
| 580 | + * |
|
| 581 | 581 | * @return bool |
| 582 | 582 | */ |
| 583 | 583 | public function is_save_postback() { |
@@ -591,16 +591,16 @@ discard block |
||
| 591 | 591 | */ |
| 592 | 592 | public function license_key_notice() { |
| 593 | 593 | |
| 594 | - if( $this->is_save_postback() ) { |
|
| 595 | - $settings = $this->get_posted_settings(); |
|
| 596 | - $license_key = \GV\Utils::get( $settings, 'license_key' ); |
|
| 597 | - $license_status = \GV\Utils::get( $settings, 'license_key_status', 'inactive' ); |
|
| 598 | - } else { |
|
| 599 | - $license_status = $this->get( 'license_key_status', 'inactive' ); |
|
| 600 | - $license_key = $this->get( 'license_key' ); |
|
| 601 | - } |
|
| 594 | + if( $this->is_save_postback() ) { |
|
| 595 | + $settings = $this->get_posted_settings(); |
|
| 596 | + $license_key = \GV\Utils::get( $settings, 'license_key' ); |
|
| 597 | + $license_status = \GV\Utils::get( $settings, 'license_key_status', 'inactive' ); |
|
| 598 | + } else { |
|
| 599 | + $license_status = $this->get( 'license_key_status', 'inactive' ); |
|
| 600 | + $license_key = $this->get( 'license_key' ); |
|
| 601 | + } |
|
| 602 | 602 | |
| 603 | - $license_id = empty( $license_key ) ? 'license' : $license_key; |
|
| 603 | + $license_id = empty( $license_key ) ? 'license' : $license_key; |
|
| 604 | 604 | |
| 605 | 605 | $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' ); |
| 606 | 606 | |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | $update_below = false; |
| 618 | 618 | $primary_button_link = admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ); |
| 619 | 619 | |
| 620 | - switch ( $license_status ) { |
|
| 620 | + switch ( $license_status ) { |
|
| 621 | 621 | /** @since 1.17 */ |
| 622 | 622 | case 'expired': |
| 623 | 623 | $title = __( 'Expired License', 'gravityview' ); |
@@ -655,13 +655,13 @@ discard block |
||
| 655 | 655 | return; |
| 656 | 656 | } |
| 657 | 657 | |
| 658 | - \GravityView_Admin_Notices::add_notice( array( |
|
| 659 | - 'message' => $message, |
|
| 660 | - 'class' => 'notice notice-warning', |
|
| 661 | - 'title' => $title, |
|
| 662 | - 'cap' => 'gravityview_edit_settings', |
|
| 663 | - 'dismiss' => sha1( $license_status . '_' . $license_id . '_' . date( 'z' ) ), // Show every day, instead of every 8 weeks (which is the default) |
|
| 664 | - ) ); |
|
| 658 | + \GravityView_Admin_Notices::add_notice( array( |
|
| 659 | + 'message' => $message, |
|
| 660 | + 'class' => 'notice notice-warning', |
|
| 661 | + 'title' => $title, |
|
| 662 | + 'cap' => 'gravityview_edit_settings', |
|
| 663 | + 'dismiss' => sha1( $license_status . '_' . $license_id . '_' . date( 'z' ) ), // Show every day, instead of every 8 weeks (which is the default) |
|
| 664 | + ) ); |
|
| 665 | 665 | } |
| 666 | 666 | |
| 667 | 667 | /** |
@@ -675,12 +675,12 @@ discard block |
||
| 675 | 675 | } |
| 676 | 676 | |
| 677 | 677 | /** |
| 678 | - * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
| 679 | - * |
|
| 680 | - * @since 1.21.5 |
|
| 681 | - * |
|
| 682 | - * @see GFAddOn::scripts() |
|
| 683 | - * |
|
| 678 | + * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
| 679 | + * |
|
| 680 | + * @since 1.21.5 |
|
| 681 | + * |
|
| 682 | + * @see GFAddOn::scripts() |
|
| 683 | + * |
|
| 684 | 684 | * @return array Array of scripts |
| 685 | 685 | */ |
| 686 | 686 | public function scripts() { |
@@ -689,10 +689,10 @@ discard block |
||
| 689 | 689 | $scripts[] = array( |
| 690 | 690 | 'handle' => 'gform_tooltip_init', |
| 691 | 691 | 'enqueue' => array( |
| 692 | - array( |
|
| 693 | - 'admin_page' => array( 'app_settings' ) |
|
| 694 | - ) |
|
| 695 | - ) |
|
| 692 | + array( |
|
| 693 | + 'admin_page' => array( 'app_settings' ) |
|
| 694 | + ) |
|
| 695 | + ) |
|
| 696 | 696 | ); |
| 697 | 697 | |
| 698 | 698 | return $scripts; |
@@ -710,10 +710,10 @@ discard block |
||
| 710 | 710 | 'src' => plugins_url( 'assets/css/admin-settings.css', GRAVITYVIEW_FILE ), |
| 711 | 711 | 'version' => Plugin::$version, |
| 712 | 712 | 'deps' => array( |
| 713 | - 'gform_admin', |
|
| 713 | + 'gform_admin', |
|
| 714 | 714 | 'gaddon_form_settings_css', |
| 715 | - 'gform_tooltip', |
|
| 716 | - 'gform_font_awesome', |
|
| 715 | + 'gform_tooltip', |
|
| 716 | + 'gform_font_awesome', |
|
| 717 | 717 | ), |
| 718 | 718 | 'enqueue' => array( |
| 719 | 719 | array( 'admin_page' => array( |
@@ -881,7 +881,7 @@ discard block |
||
| 881 | 881 | array( |
| 882 | 882 | 'label' => _x( 'Show me beta versions if they are available.', 'gravityview' ), |
| 883 | 883 | 'value' => '1', |
| 884 | - 'name' => 'beta', |
|
| 884 | + 'name' => 'beta', |
|
| 885 | 885 | ), |
| 886 | 886 | ), |
| 887 | 887 | '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' ), |
@@ -919,38 +919,38 @@ discard block |
||
| 919 | 919 | |
| 920 | 920 | if ( empty( $field['disabled'] ) ) { |
| 921 | 921 | unset( $field['disabled'] ); |
| 922 | - } |
|
| 922 | + } |
|
| 923 | 923 | } |
| 924 | 924 | |
| 925 | - $sections = array( |
|
| 926 | - array( |
|
| 927 | - 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __( 'You are running GravityView version %s', 'gravityview' ), Plugin::$version ) ), |
|
| 928 | - 'fields' => $fields, |
|
| 929 | - ) |
|
| 930 | - ); |
|
| 925 | + $sections = array( |
|
| 926 | + array( |
|
| 927 | + 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __( 'You are running GravityView version %s', 'gravityview' ), Plugin::$version ) ), |
|
| 928 | + 'fields' => $fields, |
|
| 929 | + ) |
|
| 930 | + ); |
|
| 931 | 931 | |
| 932 | - // custom 'update settings' button |
|
| 933 | - $button = array( |
|
| 934 | - 'class' => 'button button-primary button-hero', |
|
| 935 | - 'type' => 'save', |
|
| 936 | - ); |
|
| 932 | + // custom 'update settings' button |
|
| 933 | + $button = array( |
|
| 934 | + 'class' => 'button button-primary button-hero', |
|
| 935 | + 'type' => 'save', |
|
| 936 | + ); |
|
| 937 | 937 | |
| 938 | 938 | if ( $disabled_attribute ) { |
| 939 | 939 | $button['disabled'] = $disabled_attribute; |
| 940 | 940 | } |
| 941 | 941 | |
| 942 | - /** |
|
| 943 | - * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
| 944 | - * Extensions can tap in here to insert their own section and settings. |
|
| 945 | - * <code> |
|
| 946 | - * $sections[] = array( |
|
| 947 | - * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
| 948 | - * 'fields' => $settings, |
|
| 949 | - * ); |
|
| 950 | - * </code> |
|
| 951 | - * @param array $extension_settings Empty array, ready for extension settings! |
|
| 952 | - */ |
|
| 953 | - $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
| 942 | + /** |
|
| 943 | + * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
| 944 | + * Extensions can tap in here to insert their own section and settings. |
|
| 945 | + * <code> |
|
| 946 | + * $sections[] = array( |
|
| 947 | + * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
| 948 | + * 'fields' => $settings, |
|
| 949 | + * ); |
|
| 950 | + * </code> |
|
| 951 | + * @param array $extension_settings Empty array, ready for extension settings! |
|
| 952 | + */ |
|
| 953 | + $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
| 954 | 954 | |
| 955 | 955 | // If there are extensions, add a section for them |
| 956 | 956 | if ( ! empty( $extension_sections ) ) { |
@@ -963,13 +963,13 @@ discard block |
||
| 963 | 963 | } |
| 964 | 964 | } |
| 965 | 965 | |
| 966 | - $k = count( $extension_sections ) - 1 ; |
|
| 967 | - $extension_sections[ $k ]['fields'][] = $button; |
|
| 966 | + $k = count( $extension_sections ) - 1 ; |
|
| 967 | + $extension_sections[ $k ]['fields'][] = $button; |
|
| 968 | 968 | $sections = array_merge( $sections, $extension_sections ); |
| 969 | 969 | } else { |
| 970 | - // add the 'update settings' button to the general section |
|
| 971 | - $sections[0]['fields'][] = $button; |
|
| 972 | - } |
|
| 970 | + // add the 'update settings' button to the general section |
|
| 971 | + $sections[0]['fields'][] = $button; |
|
| 972 | + } |
|
| 973 | 973 | |
| 974 | 974 | return $sections; |
| 975 | 975 | } |
@@ -1023,9 +1023,9 @@ discard block |
||
| 1023 | 1023 | */ |
| 1024 | 1024 | protected function settings_edd_license( $field, $echo = true ) { |
| 1025 | 1025 | |
| 1026 | - if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
|
| 1027 | - $field['input_type'] = 'password'; |
|
| 1028 | - } |
|
| 1026 | + if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) { |
|
| 1027 | + $field['input_type'] = 'password'; |
|
| 1028 | + } |
|
| 1029 | 1029 | |
| 1030 | 1030 | $text = $this->settings_text( $field, false ); |
| 1031 | 1031 | |
@@ -1042,9 +1042,9 @@ discard block |
||
| 1042 | 1042 | |
| 1043 | 1043 | /** |
| 1044 | 1044 | * Allow pure HTML settings row |
| 1045 | - * |
|
| 1046 | - * @since 2.0.6 |
|
| 1047 | - * |
|
| 1045 | + * |
|
| 1046 | + * @since 2.0.6 |
|
| 1047 | + * |
|
| 1048 | 1048 | * @param array $field |
| 1049 | 1049 | * @param bool $echo Whether to echo the |
| 1050 | 1050 | * |
@@ -1110,19 +1110,19 @@ discard block |
||
| 1110 | 1110 | } |
| 1111 | 1111 | |
| 1112 | 1112 | /** |
| 1113 | - * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it |
|
| 1114 | - * |
|
| 1115 | - * Converts `$field['description']` to `$field['gv_description']` |
|
| 1116 | - * Converts `$field['subtitle']` to `$field['description']` |
|
| 1117 | - * |
|
| 1118 | - * @see \GV\Addon_Settings::single_setting_label Converts `gv_description` back to `description` |
|
| 1119 | - * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description |
|
| 1120 | - * |
|
| 1121 | - * @since 1.21.5.2 |
|
| 1122 | - * |
|
| 1113 | + * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it |
|
| 1114 | + * |
|
| 1115 | + * Converts `$field['description']` to `$field['gv_description']` |
|
| 1116 | + * Converts `$field['subtitle']` to `$field['description']` |
|
| 1117 | + * |
|
| 1118 | + * @see \GV\Addon_Settings::single_setting_label Converts `gv_description` back to `description` |
|
| 1119 | + * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description |
|
| 1120 | + * |
|
| 1121 | + * @since 1.21.5.2 |
|
| 1122 | + * |
|
| 1123 | 1123 | * @param array $field |
| 1124 | - * |
|
| 1125 | - * @return void |
|
| 1124 | + * |
|
| 1125 | + * @return void |
|
| 1126 | 1126 | */ |
| 1127 | 1127 | public function single_setting_row( $field ) { |
| 1128 | 1128 | $field['gv_description'] = Utils::get( $field, 'description' ); |