@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @return GravityView_Compatibility |
| 77 | 77 | */ |
| 78 | 78 | public static function getInstance() { |
| 79 | - if( self::$instance ) { |
|
| 79 | + if ( self::$instance ) { |
|
| 80 | 80 | return self::$instance; |
| 81 | 81 | } |
| 82 | 82 | return new self; |
@@ -154,10 +154,10 @@ discard block |
||
| 154 | 154 | // If Gravity Forms doesn't exist or is outdated, load the admin view class to |
| 155 | 155 | // show the notice, but not load any post types or process shortcodes. |
| 156 | 156 | // Without Gravity Forms, there is no GravityView. Beautiful, really. |
| 157 | - if( ! self::is_valid() ) { |
|
| 157 | + if ( ! self::is_valid() ) { |
|
| 158 | 158 | |
| 159 | 159 | // If the plugin's not loaded, might as well hide the shortcode for people. |
| 160 | - add_shortcode( 'gravityview', array( $this, '_shortcode_gf_notice') ); |
|
| 160 | + add_shortcode( 'gravityview', array( $this, '_shortcode_gf_notice' ) ); |
|
| 161 | 161 | |
| 162 | 162 | } |
| 163 | 163 | } |
@@ -183,15 +183,15 @@ discard block |
||
| 183 | 183 | */ |
| 184 | 184 | public function _shortcode_gf_notice( $atts = array(), $content = null, $shortcode = 'gravityview' ) { |
| 185 | 185 | |
| 186 | - if( ! GVCommon::has_cap( 'activate_plugins' ) ) { |
|
| 186 | + if ( ! GVCommon::has_cap( 'activate_plugins' ) ) { |
|
| 187 | 187 | return null; |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | $notices = self::get_notices(); |
| 191 | 191 | |
| 192 | - $message = '<div style="border:1px solid red; padding: 15px;"><p style="text-align:center;"><em>' . esc_html__( 'You are seeing this notice because you are an administrator. Other users of the site will see nothing.', 'gravityview') . '</em></p>'; |
|
| 193 | - foreach( (array)$notices as $notice ) { |
|
| 194 | - $message .= wpautop( $notice['message'] ); |
|
| 192 | + $message = '<div style="border:1px solid red; padding: 15px;"><p style="text-align:center;"><em>' . esc_html__( 'You are seeing this notice because you are an administrator. Other users of the site will see nothing.', 'gravityview' ) . '</em></p>'; |
|
| 193 | + foreach ( (array)$notices as $notice ) { |
|
| 194 | + $message .= wpautop( $notice[ 'message' ] ); |
|
| 195 | 195 | } |
| 196 | 196 | $message .= '</div>'; |
| 197 | 197 | |
@@ -211,12 +211,12 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | if ( |
| 213 | 213 | ( defined( 'GRAVITYVIEW_FUTURE_CORE_LOADED' ) && ! gravityview()->plugin->is_compatible_php() ) |
| 214 | - || ( false === version_compare( phpversion(), GV_MIN_PHP_VERSION , '>=' ) ) |
|
| 214 | + || ( false === version_compare( phpversion(), GV_MIN_PHP_VERSION, '>=' ) ) |
|
| 215 | 215 | ) { |
| 216 | 216 | |
| 217 | - self::$notices['php_version'] = array( |
|
| 217 | + self::$notices[ 'php_version' ] = array( |
|
| 218 | 218 | 'class' => 'error', |
| 219 | - 'message' => sprintf( __( "%sGravityView requires PHP Version %s or newer.%s \n\nYou're using Version %s. Please ask your host to upgrade your server's PHP.", 'gravityview' ), '<h3>', GV_MIN_PHP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">'.phpversion().'</span>' ), |
|
| 219 | + 'message' => sprintf( __( "%sGravityView requires PHP Version %s or newer.%s \n\nYou're using Version %s. Please ask your host to upgrade your server's PHP.", 'gravityview' ), '<h3>', GV_MIN_PHP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">' . phpversion() . '</span>' ), |
|
| 220 | 220 | 'cap' => 'manage_options', |
| 221 | 221 | 'dismiss' => 'php_version', |
| 222 | 222 | ); |
@@ -224,14 +224,14 @@ discard block |
||
| 224 | 224 | return false; |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - if( false === version_compare( phpversion(), GV_FUTURE_MIN_PHP_VERSION , '>=' ) ) { |
|
| 227 | + if ( false === version_compare( phpversion(), GV_FUTURE_MIN_PHP_VERSION, '>=' ) ) { |
|
| 228 | 228 | |
| 229 | 229 | // Show the notice on every update. Yes, annoying, but not as annoying as a plugin breaking. |
| 230 | - $key = sprintf('php_%s_%s', GV_FUTURE_MIN_PHP_VERSION, GravityView_Plugin::version ); |
|
| 230 | + $key = sprintf( 'php_%s_%s', GV_FUTURE_MIN_PHP_VERSION, GravityView_Plugin::version ); |
|
| 231 | 231 | |
| 232 | 232 | self::$notices[ $key ] = array( |
| 233 | 233 | 'class' => 'error', |
| 234 | - 'message' => sprintf( __( "%sGravityView will soon require PHP Version %s.%s \n\nYou're using Version %s. Please ask your host to upgrade your server's PHP.", 'gravityview' ), '<h3>', GV_FUTURE_MIN_PHP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">'.phpversion().'</span>' ), |
|
| 234 | + 'message' => sprintf( __( "%sGravityView will soon require PHP Version %s.%s \n\nYou're using Version %s. Please ask your host to upgrade your server's PHP.", 'gravityview' ), '<h3>', GV_FUTURE_MIN_PHP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">' . phpversion() . '</span>' ), |
|
| 235 | 235 | 'cap' => 'manage_options', |
| 236 | 236 | 'dismiss' => $key, |
| 237 | 237 | ); |
@@ -255,9 +255,9 @@ discard block |
||
| 255 | 255 | || ( false === version_compare( $wp_version, GV_MIN_WP_VERSION, '>=' ) ) |
| 256 | 256 | ) { |
| 257 | 257 | |
| 258 | - self::$notices['wp_version'] = array( |
|
| 258 | + self::$notices[ 'wp_version' ] = array( |
|
| 259 | 259 | 'class' => 'error', |
| 260 | - 'message' => sprintf( __( "%sGravityView requires WordPress %s or newer.%s \n\nYou're using Version %s. Please upgrade your WordPress installation.", 'gravityview' ), '<h3>', GV_MIN_WP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">'.$wp_version.'</span>' ), |
|
| 260 | + 'message' => sprintf( __( "%sGravityView requires WordPress %s or newer.%s \n\nYou're using Version %s. Please upgrade your WordPress installation.", 'gravityview' ), '<h3>', GV_MIN_WP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">' . $wp_version . '</span>' ), |
|
| 261 | 261 | 'cap' => 'update_core', |
| 262 | 262 | 'dismiss' => 'wp_version', |
| 263 | 263 | ); |
@@ -280,10 +280,10 @@ discard block |
||
| 280 | 280 | public static function check_gravityforms() { |
| 281 | 281 | |
| 282 | 282 | // Bypass other checks: if the class exists |
| 283 | - if( class_exists( 'GFCommon' ) ) { |
|
| 283 | + if ( class_exists( 'GFCommon' ) ) { |
|
| 284 | 284 | |
| 285 | 285 | // Does the version meet future requirements? |
| 286 | - if( true === version_compare( GFCommon::$version, GV_FUTURE_MIN_GF_VERSION, ">=" ) ) { |
|
| 286 | + if ( true === version_compare( GFCommon::$version, GV_FUTURE_MIN_GF_VERSION, ">=" ) ) { |
|
| 287 | 287 | return true; |
| 288 | 288 | } |
| 289 | 289 | |
@@ -297,9 +297,9 @@ discard block |
||
| 297 | 297 | $class = $meets_minimum ? 'notice-warning' : 'error'; |
| 298 | 298 | |
| 299 | 299 | // Show the notice even if the future version requirements aren't met |
| 300 | - self::$notices['gf_version'] = array( |
|
| 300 | + self::$notices[ 'gf_version' ] = array( |
|
| 301 | 301 | 'class' => $class, |
| 302 | - 'message' => sprintf( __( "%sGravityView requires Gravity Forms Version %s or newer.%s \n\nYou're using Version %s. Please update your Gravity Forms or purchase a license. %sGet Gravity Forms%s - starting at $39%s%s", 'gravityview' ), '<h3>', GV_FUTURE_MIN_GF_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">'.GFCommon::$version.'</span>', "\n\n".'<a href="https://gravityview.co/gravityforms/" class="button button-secondary button-large button-hero">' , '<em>', '</em>', '</a>'), |
|
| 302 | + 'message' => sprintf( __( "%sGravityView requires Gravity Forms Version %s or newer.%s \n\nYou're using Version %s. Please update your Gravity Forms or purchase a license. %sGet Gravity Forms%s - starting at $39%s%s", 'gravityview' ), '<h3>', GV_FUTURE_MIN_GF_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">' . GFCommon::$version . '</span>', "\n\n" . '<a href="https://gravityview.co/gravityforms/" class="button button-secondary button-large button-hero">', '<em>', '</em>', '</a>' ), |
|
| 303 | 303 | 'cap' => 'update_plugins', |
| 304 | 304 | 'dismiss' => 'gf_version_' . GV_FUTURE_MIN_GF_VERSION, |
| 305 | 305 | ); |
@@ -315,42 +315,42 @@ discard block |
||
| 315 | 315 | * OR |
| 316 | 316 | * It's the Network Admin and we just don't know whether the sites have GF activated themselves. |
| 317 | 317 | */ |
| 318 | - if( true === $gf_status || is_network_admin() ) { |
|
| 318 | + if ( true === $gf_status || is_network_admin() ) { |
|
| 319 | 319 | return true; |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | // If GFCommon doesn't exist, assume GF not active |
| 323 | 323 | $return = false; |
| 324 | 324 | |
| 325 | - switch( $gf_status ) { |
|
| 325 | + switch ( $gf_status ) { |
|
| 326 | 326 | case 'inactive': |
| 327 | 327 | |
| 328 | 328 | // Required for multisite |
| 329 | - if( ! function_exists('wp_create_nonce') ) { |
|
| 329 | + if ( ! function_exists( 'wp_create_nonce' ) ) { |
|
| 330 | 330 | require_once ABSPATH . WPINC . '/pluggable.php'; |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | // Otherwise, throws an error on activation & deactivation "Use of undefined constant LOGGED_IN_COOKIE" |
| 334 | - if( is_multisite() ) { |
|
| 334 | + if ( is_multisite() ) { |
|
| 335 | 335 | wp_cookie_constants(); |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | $return = false; |
| 339 | 339 | |
| 340 | - $button = function_exists('is_network_admin') && is_network_admin() ? '<strong><a href="#gravity-forms">' : '<strong><a href="'. wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=gravityforms/gravityforms.php' ), 'activate-plugin_gravityforms/gravityforms.php') . '" class="button button-large">'; |
|
| 340 | + $button = function_exists( 'is_network_admin' ) && is_network_admin() ? '<strong><a href="#gravity-forms">' : '<strong><a href="' . wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=gravityforms/gravityforms.php' ), 'activate-plugin_gravityforms/gravityforms.php' ) . '" class="button button-large">'; |
|
| 341 | 341 | |
| 342 | - self::$notices['gf_inactive'] = array( |
|
| 342 | + self::$notices[ 'gf_inactive' ] = array( |
|
| 343 | 343 | 'class' => 'error', |
| 344 | - 'message' => sprintf( __( '%sGravityView requires Gravity Forms to be active. %sActivate Gravity Forms%s to use the GravityView plugin.', 'gravityview' ), '<h3>', "</h3>\n\n". $button, '</a></strong>' ), |
|
| 344 | + 'message' => sprintf( __( '%sGravityView requires Gravity Forms to be active. %sActivate Gravity Forms%s to use the GravityView plugin.', 'gravityview' ), '<h3>', "</h3>\n\n" . $button, '</a></strong>' ), |
|
| 345 | 345 | 'cap' => 'activate_plugins', |
| 346 | 346 | 'dismiss' => 'gf_inactive', |
| 347 | 347 | ); |
| 348 | 348 | |
| 349 | 349 | break; |
| 350 | 350 | default: |
| 351 | - self::$notices['gf_installed'] = array( |
|
| 351 | + self::$notices[ 'gf_installed' ] = array( |
|
| 352 | 352 | 'class' => 'error', |
| 353 | - 'message' => sprintf( __( '%sGravityView requires Gravity Forms to be installed in order to run properly. %sGet Gravity Forms%s - starting at $39%s%s', 'gravityview' ), '<h3>', "</h3>\n\n".'<a href="http://katz.si/gravityforms" class="button button-secondary button-large button-hero">' , '<em>', '</em>', '</a>'), |
|
| 353 | + 'message' => sprintf( __( '%sGravityView requires Gravity Forms to be installed in order to run properly. %sGet Gravity Forms%s - starting at $39%s%s', 'gravityview' ), '<h3>', "</h3>\n\n" . '<a href="http://katz.si/gravityforms" class="button button-secondary button-large button-hero">', '<em>', '</em>', '</a>' ), |
|
| 354 | 354 | 'cap' => 'install_plugins', |
| 355 | 355 | 'dismiss' => 'gf_installed', |
| 356 | 356 | ); |
@@ -367,10 +367,10 @@ discard block |
||
| 367 | 367 | */ |
| 368 | 368 | private static function check_gf_directory() { |
| 369 | 369 | |
| 370 | - if( class_exists( 'GFDirectory' ) ) { |
|
| 371 | - self::$notices['gf_directory'] = array( |
|
| 370 | + if ( class_exists( 'GFDirectory' ) ) { |
|
| 371 | + self::$notices[ 'gf_directory' ] = array( |
|
| 372 | 372 | 'class' => 'error is-dismissible', |
| 373 | - 'title' => __('Potential Conflict', 'gravityview' ), |
|
| 373 | + 'title' => __( 'Potential Conflict', 'gravityview' ), |
|
| 374 | 374 | 'message' => __( 'GravityView and Gravity Forms Directory are both active. This may cause problems. If you experience issues, disable the Gravity Forms Directory plugin.', 'gravityview' ), |
| 375 | 375 | 'dismiss' => 'gf_directory', |
| 376 | 376 | 'cap' => 'activate_plugins', |
@@ -389,21 +389,21 @@ discard block |
||
| 389 | 389 | */ |
| 390 | 390 | public static function get_plugin_status( $location = '' ) { |
| 391 | 391 | |
| 392 | - if( ! function_exists('is_plugin_active') ) { |
|
| 392 | + if ( ! function_exists( 'is_plugin_active' ) ) { |
|
| 393 | 393 | include_once( ABSPATH . '/wp-admin/includes/plugin.php' ); |
| 394 | 394 | } |
| 395 | 395 | |
| 396 | - if( is_network_admin() && is_plugin_active_for_network( $location ) ) { |
|
| 396 | + if ( is_network_admin() && is_plugin_active_for_network( $location ) ) { |
|
| 397 | 397 | return true; |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | - if( !is_network_admin() && is_plugin_active( $location ) ) { |
|
| 400 | + if ( ! is_network_admin() && is_plugin_active( $location ) ) { |
|
| 401 | 401 | return true; |
| 402 | 402 | } |
| 403 | 403 | |
| 404 | - if( |
|
| 405 | - !file_exists( trailingslashit( WP_PLUGIN_DIR ) . $location ) && |
|
| 406 | - !file_exists( trailingslashit( WPMU_PLUGIN_DIR ) . $location ) |
|
| 404 | + if ( |
|
| 405 | + ! file_exists( trailingslashit( WP_PLUGIN_DIR ) . $location ) && |
|
| 406 | + ! file_exists( trailingslashit( WPMU_PLUGIN_DIR ) . $location ) |
|
| 407 | 407 | ) { |
| 408 | 408 | return false; |
| 409 | 409 | } |
@@ -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 | } |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | $license_key = self::getSetting('license_key'); |
| 432 | 432 | if( '' === $license_key ) { |
| 433 | 433 | $license_status = 'inactive'; |
| 434 | - } |
|
| 434 | + } |
|
| 435 | 435 | $license_id = empty( $license_key ) ? 'license' : $license_key; |
| 436 | 436 | |
| 437 | 437 | $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'); |
@@ -491,12 +491,12 @@ discard block |
||
| 491 | 491 | } |
| 492 | 492 | |
| 493 | 493 | /** |
| 494 | - * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
| 495 | - * |
|
| 496 | - * @since 1.21.5 |
|
| 497 | - * |
|
| 498 | - * @see GFAddOn::scripts() |
|
| 499 | - * |
|
| 494 | + * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason. |
|
| 495 | + * |
|
| 496 | + * @since 1.21.5 |
|
| 497 | + * |
|
| 498 | + * @see GFAddOn::scripts() |
|
| 499 | + * |
|
| 500 | 500 | * @return array Array of scripts |
| 501 | 501 | */ |
| 502 | 502 | public function scripts() { |
@@ -505,10 +505,10 @@ discard block |
||
| 505 | 505 | $scripts[] = array( |
| 506 | 506 | 'handle' => 'gform_tooltip_init', |
| 507 | 507 | 'enqueue' => array( |
| 508 | - array( |
|
| 509 | - 'admin_page' => array( 'app_settings' ) |
|
| 510 | - ) |
|
| 511 | - ) |
|
| 508 | + array( |
|
| 509 | + 'admin_page' => array( 'app_settings' ) |
|
| 510 | + ) |
|
| 511 | + ) |
|
| 512 | 512 | ); |
| 513 | 513 | |
| 514 | 514 | return $scripts; |
@@ -527,10 +527,10 @@ discard block |
||
| 527 | 527 | 'src' => plugins_url( 'assets/css/admin-settings.css', GRAVITYVIEW_FILE ), |
| 528 | 528 | 'version' => GravityView_Plugin::version, |
| 529 | 529 | "deps" => array( |
| 530 | - 'gform_admin', |
|
| 530 | + 'gform_admin', |
|
| 531 | 531 | 'gaddon_form_settings_css', |
| 532 | - 'gform_tooltip', |
|
| 533 | - 'gform_font_awesome', |
|
| 532 | + 'gform_tooltip', |
|
| 533 | + 'gform_font_awesome', |
|
| 534 | 534 | ), |
| 535 | 535 | 'enqueue' => array( |
| 536 | 536 | array( 'admin_page' => array( |
@@ -596,12 +596,12 @@ discard block |
||
| 596 | 596 | } |
| 597 | 597 | |
| 598 | 598 | public function app_settings_tab() { |
| 599 | - parent::app_settings_tab(); |
|
| 599 | + parent::app_settings_tab(); |
|
| 600 | 600 | |
| 601 | 601 | if ( $this->maybe_uninstall() ) { |
| 602 | - echo $this->uninstall_form(); |
|
| 602 | + echo $this->uninstall_form(); |
|
| 603 | 603 | } |
| 604 | - } |
|
| 604 | + } |
|
| 605 | 605 | |
| 606 | 606 | /** |
| 607 | 607 | * Make protected public |
@@ -724,8 +724,8 @@ discard block |
||
| 724 | 724 | type="' . $field['type'] . '" |
| 725 | 725 | name="' . esc_attr( $name ) . '" |
| 726 | 726 | value="' . $value . '" ' . |
| 727 | - implode( ' ', $attributes ) . |
|
| 728 | - ' />'; |
|
| 727 | + implode( ' ', $attributes ) . |
|
| 728 | + ' />'; |
|
| 729 | 729 | |
| 730 | 730 | if ( $echo ) { |
| 731 | 731 | echo $html; |
@@ -951,7 +951,7 @@ discard block |
||
| 951 | 951 | array( |
| 952 | 952 | 'label' => _x('Show me beta versions if they are available.', 'gravityview'), |
| 953 | 953 | 'value' => '1', |
| 954 | - 'name' => 'beta', |
|
| 954 | + 'name' => 'beta', |
|
| 955 | 955 | ), |
| 956 | 956 | ), |
| 957 | 957 | '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'), |
@@ -976,36 +976,36 @@ discard block |
||
| 976 | 976 | } |
| 977 | 977 | |
| 978 | 978 | |
| 979 | - $sections = array( |
|
| 980 | - array( |
|
| 981 | - 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __('You are running GravityView version %s', 'gravityview'), GravityView_Plugin::version ) ), |
|
| 982 | - 'fields' => $fields, |
|
| 983 | - ) |
|
| 984 | - ); |
|
| 979 | + $sections = array( |
|
| 980 | + array( |
|
| 981 | + 'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __('You are running GravityView version %s', 'gravityview'), GravityView_Plugin::version ) ), |
|
| 982 | + 'fields' => $fields, |
|
| 983 | + ) |
|
| 984 | + ); |
|
| 985 | 985 | |
| 986 | - // custom 'update settings' button |
|
| 987 | - $button = array( |
|
| 988 | - 'class' => 'button button-primary button-hero', |
|
| 989 | - 'type' => 'save', |
|
| 990 | - ); |
|
| 986 | + // custom 'update settings' button |
|
| 987 | + $button = array( |
|
| 988 | + 'class' => 'button button-primary button-hero', |
|
| 989 | + 'type' => 'save', |
|
| 990 | + ); |
|
| 991 | 991 | |
| 992 | 992 | if( $disabled_attribute ) { |
| 993 | 993 | $button['disabled'] = $disabled_attribute; |
| 994 | 994 | } |
| 995 | 995 | |
| 996 | 996 | |
| 997 | - /** |
|
| 998 | - * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
| 999 | - * Extensions can tap in here to insert their own section and settings. |
|
| 1000 | - * <code> |
|
| 1001 | - * $sections[] = array( |
|
| 1002 | - * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
| 1003 | - * 'fields' => $settings, |
|
| 1004 | - * ); |
|
| 1005 | - * </code> |
|
| 1006 | - * @param array $extension_settings Empty array, ready for extension settings! |
|
| 1007 | - */ |
|
| 1008 | - $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
| 997 | + /** |
|
| 998 | + * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page |
|
| 999 | + * Extensions can tap in here to insert their own section and settings. |
|
| 1000 | + * <code> |
|
| 1001 | + * $sections[] = array( |
|
| 1002 | + * 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), |
|
| 1003 | + * 'fields' => $settings, |
|
| 1004 | + * ); |
|
| 1005 | + * </code> |
|
| 1006 | + * @param array $extension_settings Empty array, ready for extension settings! |
|
| 1007 | + */ |
|
| 1008 | + $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() ); |
|
| 1009 | 1009 | |
| 1010 | 1010 | // If there are extensions, add a section for them |
| 1011 | 1011 | if ( ! empty( $extension_sections ) ) { |
@@ -1018,13 +1018,13 @@ discard block |
||
| 1018 | 1018 | } |
| 1019 | 1019 | } |
| 1020 | 1020 | |
| 1021 | - $k = count( $extension_sections ) - 1 ; |
|
| 1022 | - $extension_sections[ $k ]['fields'][] = $button; |
|
| 1021 | + $k = count( $extension_sections ) - 1 ; |
|
| 1022 | + $extension_sections[ $k ]['fields'][] = $button; |
|
| 1023 | 1023 | $sections = array_merge( $sections, $extension_sections ); |
| 1024 | 1024 | } else { |
| 1025 | - // add the 'update settings' button to the general section |
|
| 1026 | - $sections[0]['fields'][] = $button; |
|
| 1027 | - } |
|
| 1025 | + // add the 'update settings' button to the general section |
|
| 1026 | + $sections[0]['fields'][] = $button; |
|
| 1027 | + } |
|
| 1028 | 1028 | |
| 1029 | 1029 | return $sections; |
| 1030 | 1030 | } |