| @@ -312,11 +312,11 @@ discard block | ||
| 312 | 312 | include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-change-entry-creator.php' ); | 
| 313 | 313 | |
| 314 | 314 | |
| 315 | - /** | |
| 316 | - * When an entry is created, check if we need to update the custom slug meta | |
| 317 | - * todo: move this to its own class.. | |
| 318 | - */ | |
| 319 | - add_action( 'gform_entry_created', array( 'GravityView_API', 'entry_create_custom_slug' ), 10, 2 ); | |
| 315 | + /** | |
| 316 | + * When an entry is created, check if we need to update the custom slug meta | |
| 317 | + * todo: move this to its own class.. | |
| 318 | + */ | |
| 319 | + add_action( 'gform_entry_created', array( 'GravityView_API', 'entry_create_custom_slug' ), 10, 2 ); | |
| 320 | 320 | |
| 321 | 321 | /** | 
| 322 | 322 | * @action `gravityview_include_frontend_actions` Triggered after all GravityView frontend files are loaded | 
| @@ -347,34 +347,34 @@ discard block | ||
| 347 | 347 | |
| 348 | 348 | /** DEBUG */ | 
| 349 | 349 | |
| 350 | - /** | |
| 351 | - * Logs messages using Gravity Forms logging add-on | |
| 352 | - * @param string $message log message | |
| 353 | - * @param mixed $data Additional data to display | |
| 354 | - * @return void | |
| 355 | - */ | |
| 356 | -    public static function log_debug( $message, $data = null ){ | |
| 357 | - /** | |
| 358 | - * @action `gravityview_log_debug` Log a debug message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output | |
| 359 | - * @param string $message Message to display | |
| 360 | - * @param mixed $data Supporting data to print alongside it | |
| 361 | - */ | |
| 362 | - do_action( 'gravityview_log_debug', $message, $data ); | |
| 363 | - } | |
| 364 | - | |
| 365 | - /** | |
| 366 | - * Logs messages using Gravity Forms logging add-on | |
| 367 | - * @param string $message log message | |
| 368 | - * @return void | |
| 369 | - */ | |
| 370 | -    public static function log_error( $message, $data = null ){ | |
| 371 | - /** | |
| 372 | - * @action `gravityview_log_error` Log an error message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output | |
| 373 | - * @param string $message Error message to display | |
| 374 | - * @param mixed $data Supporting data to print alongside it | |
| 375 | - */ | |
| 376 | - do_action( 'gravityview_log_error', $message, $data ); | |
| 377 | - } | |
| 350 | + /** | |
| 351 | + * Logs messages using Gravity Forms logging add-on | |
| 352 | + * @param string $message log message | |
| 353 | + * @param mixed $data Additional data to display | |
| 354 | + * @return void | |
| 355 | + */ | |
| 356 | +	public static function log_debug( $message, $data = null ){ | |
| 357 | + /** | |
| 358 | + * @action `gravityview_log_debug` Log a debug message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output | |
| 359 | + * @param string $message Message to display | |
| 360 | + * @param mixed $data Supporting data to print alongside it | |
| 361 | + */ | |
| 362 | + do_action( 'gravityview_log_debug', $message, $data ); | |
| 363 | + } | |
| 364 | + | |
| 365 | + /** | |
| 366 | + * Logs messages using Gravity Forms logging add-on | |
| 367 | + * @param string $message log message | |
| 368 | + * @return void | |
| 369 | + */ | |
| 370 | +	public static function log_error( $message, $data = null ){ | |
| 371 | + /** | |
| 372 | + * @action `gravityview_log_error` Log an error message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output | |
| 373 | + * @param string $message Error message to display | |
| 374 | + * @param mixed $data Supporting data to print alongside it | |
| 375 | + */ | |
| 376 | + do_action( 'gravityview_log_error', $message, $data ); | |
| 377 | + } | |
| 378 | 378 | |
| 379 | 379 | } // end class GravityView_Plugin | 
| 380 | 380 | |
| @@ -351,7 +351,7 @@ discard block | ||
| 351 | 351 | * @param mixed $data Additional data to display | 
| 352 | 352 | * @return void | 
| 353 | 353 | */ | 
| 354 | -    public static function log_debug( $message, $data = null ){ | |
| 354 | +    public static function log_debug( $message, $data = null ) { | |
| 355 | 355 | /** | 
| 356 | 356 | * @action `gravityview_log_debug` Log a debug message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output | 
| 357 | 357 | * @param string $message Message to display | 
| @@ -365,7 +365,7 @@ discard block | ||
| 365 | 365 | * @param string $message log message | 
| 366 | 366 | * @return void | 
| 367 | 367 | */ | 
| 368 | -    public static function log_error( $message, $data = null ){ | |
| 368 | +    public static function log_error( $message, $data = null ) { | |
| 369 | 369 | /** | 
| 370 | 370 | * @action `gravityview_log_error` Log an error message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output | 
| 371 | 371 | * @param string $message Error message to display | 
| @@ -15,7 +15,7 @@ | ||
| 15 | 15 | return; | 
| 16 | 16 | } | 
| 17 | 17 | |
| 18 | - $class = !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; | |
| 18 | + $class = !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; | |
| 19 | 19 | |
| 20 | 20 | ?> | 
| 21 | 21 | <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="hidden" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>" /> | 
| @@ -18,10 +18,10 @@ | ||
| 18 | 18 | |
| 19 | 19 | $show_mt = $this->show_merge_tags(); | 
| 20 | 20 | |
| 21 | -        if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { | |
| 22 | - $class = 'merge-tag-support mt-position-right mt-hide_all_fields '; | |
| 23 | - } | |
| 24 | - $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; | |
| 21 | +		if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { | |
| 22 | + $class = 'merge-tag-support mt-position-right mt-hide_all_fields '; | |
| 23 | + } | |
| 24 | + $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; | |
| 25 | 25 | |
| 26 | 26 | ?> | 
| 27 | 27 | <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="number" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>"> | 
| @@ -14,7 +14,7 @@ discard block | ||
| 14 | 14 | |
| 15 | 15 |  		if( !GravityView_Compatibility::is_valid() ) { return; } | 
| 16 | 16 | |
| 17 | - self::$metaboxes_dir = GRAVITYVIEW_DIR . 'includes/admin/metaboxes/'; | |
| 17 | + self::$metaboxes_dir = GRAVITYVIEW_DIR . 'includes/admin/metaboxes/'; | |
| 18 | 18 | |
| 19 | 19 | include_once self::$metaboxes_dir . 'class-gravityview-metabox-tab.php'; | 
| 20 | 20 | |
| @@ -228,13 +228,13 @@ discard block | ||
| 228 | 228 | $get_id_backup = isset($_GET['id']) ? $_GET['id'] : NULL; | 
| 229 | 229 | |
| 230 | 230 |  		if( isset( $form['id'] ) ) { | 
| 231 | - $form_script = 'var form = ' . GFCommon::json_encode($form) . ';'; | |
| 231 | + $form_script = 'var form = ' . GFCommon::json_encode($form) . ';'; | |
| 232 | 232 | |
| 233 | - // The `gf_vars()` method needs a $_GET[id] variable set with the form ID. | |
| 234 | - $_GET['id'] = $form['id']; | |
| 233 | + // The `gf_vars()` method needs a $_GET[id] variable set with the form ID. | |
| 234 | + $_GET['id'] = $form['id']; | |
| 235 | 235 | |
| 236 | 236 |  		} else { | 
| 237 | - $form_script = 'var form = new Form();'; | |
| 237 | + $form_script = 'var form = new Form();'; | |
| 238 | 238 | } | 
| 239 | 239 | |
| 240 | 240 | $output = '<script type="text/javascript" data-gv-merge-tags="1">' . $form_script . "\n" . GFCommon::gf_vars(false) . '</script>'; | 
| @@ -12,7 +12,9 @@ | ||
| 12 | 12 | */ | 
| 13 | 13 | |
| 14 | 14 | // Exit if accessed directly | 
| 15 | -if ( ! defined( 'ABSPATH' ) ) exit; | |
| 15 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 16 | + exit; | |
| 17 | +} | |
| 16 | 18 | |
| 17 | 19 | /** | 
| 18 | 20 | * GravityView_Welcome Class | 
| @@ -136,7 +136,7 @@ discard block | ||
| 136 | 136 | |
| 137 | 137 | // template areas | 
| 138 | 138 | $template_areas_directory = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'directory' ); | 
| 139 | - $template_areas_single = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'single' ); | |
| 139 | + $template_areas_single = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'single' ); | |
| 140 | 140 | |
| 141 | 141 | // widget areas | 
| 142 | 142 | $default_widget_areas = GravityView_Plugin::get_default_widget_areas(); | 
| @@ -328,40 +328,40 @@ discard block | ||
| 328 | 328 | // load file | 
| 329 | 329 | $xmlstr = file_get_contents( $form_file ); | 
| 330 | 330 | |
| 331 | - $options = array( | |
| 332 | -            "page" => array("unserialize_as_array" => true), | |
| 333 | -            "form"=> array("unserialize_as_array" => true), | |
| 334 | -            "field"=> array("unserialize_as_array" => true), | |
| 335 | -            "rule"=> array("unserialize_as_array" => true), | |
| 336 | -            "choice"=> array("unserialize_as_array" => true), | |
| 337 | -            "input"=> array("unserialize_as_array" => true), | |
| 338 | -            "routing_item"=> array("unserialize_as_array" => true), | |
| 339 | -            "creditCard"=> array("unserialize_as_array" => true), | |
| 340 | -            "routin"=> array("unserialize_as_array" => true), | |
| 341 | -            "confirmation" => array("unserialize_as_array" => true), | |
| 342 | -            "notification" => array("unserialize_as_array" => true) | |
| 343 | - ); | |
| 331 | + $options = array( | |
| 332 | +			"page" => array("unserialize_as_array" => true), | |
| 333 | +			"form"=> array("unserialize_as_array" => true), | |
| 334 | +			"field"=> array("unserialize_as_array" => true), | |
| 335 | +			"rule"=> array("unserialize_as_array" => true), | |
| 336 | +			"choice"=> array("unserialize_as_array" => true), | |
| 337 | +			"input"=> array("unserialize_as_array" => true), | |
| 338 | +			"routing_item"=> array("unserialize_as_array" => true), | |
| 339 | +			"creditCard"=> array("unserialize_as_array" => true), | |
| 340 | +			"routin"=> array("unserialize_as_array" => true), | |
| 341 | +			"confirmation" => array("unserialize_as_array" => true), | |
| 342 | +			"notification" => array("unserialize_as_array" => true) | |
| 343 | + ); | |
| 344 | 344 | |
| 345 | 345 | $xml = new RGXML($options); | 
| 346 | - $forms = $xml->unserialize($xmlstr); | |
| 346 | + $forms = $xml->unserialize($xmlstr); | |
| 347 | 347 | |
| 348 | -        if( !$forms ) { | |
| 349 | - do_action( 'gravityview_log_error', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. Error importing file. (File)', $form_file ); | |
| 350 | - return false; | |
| 351 | - } | |
| 348 | +		if( !$forms ) { | |
| 349 | + do_action( 'gravityview_log_error', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. Error importing file. (File)', $form_file ); | |
| 350 | + return false; | |
| 351 | + } | |
| 352 | 352 | |
| 353 | -        if( !empty( $forms[0] ) && is_array( $forms[0] ) ) { | |
| 354 | - $form = $forms[0]; | |
| 355 | - } | |
| 353 | +		if( !empty( $forms[0] ) && is_array( $forms[0] ) ) { | |
| 354 | + $form = $forms[0]; | |
| 355 | + } | |
| 356 | 356 | |
| 357 | -        if( empty( $form ) ) { | |
| 358 | - do_action( 'gravityview_log_error', '[pre_get_available_fields] $form not set.', $forms ); | |
| 359 | - return false; | |
| 360 | - } | |
| 357 | +		if( empty( $form ) ) { | |
| 358 | + do_action( 'gravityview_log_error', '[pre_get_available_fields] $form not set.', $forms ); | |
| 359 | + return false; | |
| 360 | + } | |
| 361 | 361 | |
| 362 | - do_action( 'gravityview_log_debug', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. (Form)', $form ); | |
| 362 | + do_action( 'gravityview_log_debug', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. (Form)', $form ); | |
| 363 | 363 | |
| 364 | - return $form; | |
| 364 | + return $form; | |
| 365 | 365 | |
| 366 | 366 | } | 
| 367 | 367 | |
| @@ -204,7 +204,7 @@ | ||
| 204 | 204 | self::$notices['wp_version'] = array( | 
| 205 | 205 | 'class' => 'error', | 
| 206 | 206 | '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>' ), | 
| 207 | - 'cap' => 'update_core', | |
| 207 | + 'cap' => 'update_core', | |
| 208 | 208 | 'dismiss' => 'wp_version', | 
| 209 | 209 | ); | 
| 210 | 210 | |
| @@ -244,13 +244,13 @@ | ||
| 244 | 244 | $this->_remote_update_url, | 
| 245 | 245 | $this->_path, | 
| 246 | 246 | array( | 
| 247 | - 'version' => $this->_version, // current version number | |
| 248 | - 'license' => $license['license'], | |
| 249 | - 'item_id' => $this->_item_id, // The ID of the download on _remote_update_url | |
| 250 | - 'item_name' => $this->_title, // name of this plugin | |
| 251 | - 'author' => strip_tags( $this->_author ) // author of this plugin | |
| 252 | - ) | |
| 253 | - ); | |
| 247 | + 'version' => $this->_version, // current version number | |
| 248 | + 'license' => $license['license'], | |
| 249 | + 'item_id' => $this->_item_id, // The ID of the download on _remote_update_url | |
| 250 | + 'item_name' => $this->_title, // name of this plugin | |
| 251 | + 'author' => strip_tags( $this->_author ) // author of this plugin | |
| 252 | + ) | |
| 253 | + ); | |
| 254 | 254 | } | 
| 255 | 255 | |
| 256 | 256 | /** | 
| @@ -183,12 +183,10 @@ discard block | ||
| 183 | 183 |  		if ( file_exists( $mofile_global ) ) { | 
| 184 | 184 | // Look in global /wp-content/languages/[plugin-dir]/ folder | 
| 185 | 185 | load_textdomain( $this->_text_domain, $mofile_global ); | 
| 186 | - } | |
| 187 | -		elseif ( file_exists( $mofile_local ) ) { | |
| 186 | +		} elseif ( file_exists( $mofile_local ) ) { | |
| 188 | 187 | // Look in local /wp-content/plugins/[plugin-dir]/languages/ folder | 
| 189 | 188 | load_textdomain( $this->_text_domain, $mofile_local ); | 
| 190 | - } | |
| 191 | -		else { | |
| 189 | +		} else { | |
| 192 | 190 | // Load the default language files | 
| 193 | 191 | load_plugin_textdomain( $this->_text_domain, false, $lang_dir ); | 
| 194 | 192 | } | 
| @@ -219,7 +217,7 @@ discard block | ||
| 219 | 217 |  	public function settings() { | 
| 220 | 218 | |
| 221 | 219 | // If doing ajax, get outta here | 
| 222 | -		if( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) )  { | |
| 220 | +		if( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { | |
| 223 | 221 | return; | 
| 224 | 222 | } | 
| 225 | 223 | |
| @@ -23,7 +23,7 @@ | ||
| 23 | 23 | var $style = NULL; | 
| 24 | 24 | |
| 25 | 25 | /** | 
| 26 | - * String representing size of image - Choose from "full", "medium", "thumb", "tiny" | |
| 26 | + * String representing size of image - Choose from "full", "medium", "thumb", "tiny" | |
| 27 | 27 | * @var string | 
| 28 | 28 | */ | 
| 29 | 29 | var $size = NULL; |