@@ -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 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | |
| 28 | 28 | /** If this file is called directly, abort. */ |
| 29 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 29 | +if (!defined('ABSPATH')) { |
|
| 30 | 30 | die; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -36,52 +36,52 @@ discard block |
||
| 36 | 36 | * Full path to the GravityView file |
| 37 | 37 | * @define "GRAVITYVIEW_FILE" "./gravityview.php" |
| 38 | 38 | */ |
| 39 | -define( 'GRAVITYVIEW_FILE', __FILE__ ); |
|
| 39 | +define('GRAVITYVIEW_FILE', __FILE__); |
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * The URL to this file |
| 43 | 43 | */ |
| 44 | -define( 'GRAVITYVIEW_URL', plugin_dir_url( __FILE__ ) ); |
|
| 44 | +define('GRAVITYVIEW_URL', plugin_dir_url(__FILE__)); |
|
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | /** @define "GRAVITYVIEW_DIR" "./" The absolute path to the plugin directory */ |
| 48 | -define( 'GRAVITYVIEW_DIR', plugin_dir_path( __FILE__ ) ); |
|
| 48 | +define('GRAVITYVIEW_DIR', plugin_dir_path(__FILE__)); |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * GravityView requires at least this version of Gravity Forms to function properly. |
| 52 | 52 | */ |
| 53 | -define( 'GV_MIN_GF_VERSION', '1.9.9.10' ); |
|
| 53 | +define('GV_MIN_GF_VERSION', '1.9.9.10'); |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * GravityView requires at least this version of WordPress to function properly. |
| 57 | 57 | * @since 1.12 |
| 58 | 58 | */ |
| 59 | -define( 'GV_MIN_WP_VERSION', '3.3' ); |
|
| 59 | +define('GV_MIN_WP_VERSION', '3.3'); |
|
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | 62 | * GravityView requires at least this version of PHP to function properly. |
| 63 | 63 | * @since 1.12 |
| 64 | 64 | */ |
| 65 | -define( 'GV_MIN_PHP_VERSION', '5.2.4' ); |
|
| 65 | +define('GV_MIN_PHP_VERSION', '5.2.4'); |
|
| 66 | 66 | |
| 67 | 67 | /** Load common & connector functions */ |
| 68 | -require_once( GRAVITYVIEW_DIR . 'includes/helper-functions.php' ); |
|
| 69 | -require_once( GRAVITYVIEW_DIR . 'includes/class-common.php'); |
|
| 70 | -require_once( GRAVITYVIEW_DIR . 'includes/connector-functions.php'); |
|
| 71 | -require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-compatibility.php' ); |
|
| 72 | -require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-roles-capabilities.php' ); |
|
| 73 | -require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-admin-notices.php' ); |
|
| 68 | +require_once(GRAVITYVIEW_DIR.'includes/helper-functions.php'); |
|
| 69 | +require_once(GRAVITYVIEW_DIR.'includes/class-common.php'); |
|
| 70 | +require_once(GRAVITYVIEW_DIR.'includes/connector-functions.php'); |
|
| 71 | +require_once(GRAVITYVIEW_DIR.'includes/class-gravityview-compatibility.php'); |
|
| 72 | +require_once(GRAVITYVIEW_DIR.'includes/class-gravityview-roles-capabilities.php'); |
|
| 73 | +require_once(GRAVITYVIEW_DIR.'includes/class-gravityview-admin-notices.php'); |
|
| 74 | 74 | |
| 75 | 75 | /** Register Post Types and Rewrite Rules */ |
| 76 | -require_once( GRAVITYVIEW_DIR . 'includes/class-post-types.php'); |
|
| 76 | +require_once(GRAVITYVIEW_DIR.'includes/class-post-types.php'); |
|
| 77 | 77 | |
| 78 | 78 | /** Add Cache Class */ |
| 79 | -require_once( GRAVITYVIEW_DIR . 'includes/class-cache.php'); |
|
| 79 | +require_once(GRAVITYVIEW_DIR.'includes/class-cache.php'); |
|
| 80 | 80 | |
| 81 | 81 | /** Register hooks that are fired when the plugin is activated and deactivated. */ |
| 82 | -if( is_admin() ) { |
|
| 83 | - register_activation_hook( __FILE__, array( 'GravityView_Plugin', 'activate' ) ); |
|
| 84 | - register_deactivation_hook( __FILE__, array( 'GravityView_Plugin', 'deactivate' ) ); |
|
| 82 | +if (is_admin()) { |
|
| 83 | + register_activation_hook(__FILE__, array('GravityView_Plugin', 'activate')); |
|
| 84 | + register_deactivation_hook(__FILE__, array('GravityView_Plugin', 'deactivate')); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public static function getInstance() { |
| 102 | 102 | |
| 103 | - if( empty( self::$instance ) ) { |
|
| 103 | + if (empty(self::$instance)) { |
|
| 104 | 104 | self::$instance = new self; |
| 105 | 105 | } |
| 106 | 106 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | private function __construct() { |
| 111 | 111 | |
| 112 | 112 | |
| 113 | - if( ! GravityView_Compatibility::is_valid() ) { |
|
| 113 | + if (!GravityView_Compatibility::is_valid()) { |
|
| 114 | 114 | return; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -126,10 +126,10 @@ discard block |
||
| 126 | 126 | */ |
| 127 | 127 | private function add_hooks() { |
| 128 | 128 | // Load plugin text domain |
| 129 | - add_action( 'init', array( $this, 'load_plugin_textdomain' ), 1 ); |
|
| 129 | + add_action('init', array($this, 'load_plugin_textdomain'), 1); |
|
| 130 | 130 | |
| 131 | 131 | // Load frontend files |
| 132 | - add_action( 'init', array( $this, 'frontend_actions' ), 20 ); |
|
| 132 | + add_action('init', array($this, 'frontend_actions'), 20); |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /** |
@@ -139,48 +139,48 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | public function include_files() { |
| 141 | 141 | |
| 142 | - include_once( GRAVITYVIEW_DIR .'includes/class-admin.php' ); |
|
| 142 | + include_once(GRAVITYVIEW_DIR.'includes/class-admin.php'); |
|
| 143 | 143 | |
| 144 | 144 | // Load fields |
| 145 | - include_once( GRAVITYVIEW_DIR . 'includes/fields/class-gravityview-fields.php' ); |
|
| 146 | - include_once( GRAVITYVIEW_DIR . 'includes/fields/class-gravityview-field.php' ); |
|
| 145 | + include_once(GRAVITYVIEW_DIR.'includes/fields/class-gravityview-fields.php'); |
|
| 146 | + include_once(GRAVITYVIEW_DIR.'includes/fields/class-gravityview-field.php'); |
|
| 147 | 147 | |
| 148 | 148 | // Load all field files automatically |
| 149 | - foreach ( glob( GRAVITYVIEW_DIR . 'includes/fields/class-gravityview-field*.php' ) as $gv_field_filename ) { |
|
| 150 | - include_once( $gv_field_filename ); |
|
| 149 | + foreach (glob(GRAVITYVIEW_DIR.'includes/fields/class-gravityview-field*.php') as $gv_field_filename) { |
|
| 150 | + include_once($gv_field_filename); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - include_once( GRAVITYVIEW_DIR .'includes/class-gravityview-entry-notes.php' ); |
|
| 154 | - include_once( GRAVITYVIEW_DIR .'includes/load-plugin-and-theme-hooks.php' ); |
|
| 153 | + include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-entry-notes.php'); |
|
| 154 | + include_once(GRAVITYVIEW_DIR.'includes/load-plugin-and-theme-hooks.php'); |
|
| 155 | 155 | |
| 156 | 156 | // Load Extensions |
| 157 | 157 | // @todo: Convert to a scan of the directory or a method where this all lives |
| 158 | - include_once( GRAVITYVIEW_DIR .'includes/extensions/edit-entry/class-edit-entry.php' ); |
|
| 159 | - include_once( GRAVITYVIEW_DIR .'includes/extensions/delete-entry/class-delete-entry.php' ); |
|
| 158 | + include_once(GRAVITYVIEW_DIR.'includes/extensions/edit-entry/class-edit-entry.php'); |
|
| 159 | + include_once(GRAVITYVIEW_DIR.'includes/extensions/delete-entry/class-delete-entry.php'); |
|
| 160 | 160 | |
| 161 | 161 | // Load WordPress Widgets |
| 162 | - include_once( GRAVITYVIEW_DIR .'includes/wordpress-widgets/register-wordpress-widgets.php' ); |
|
| 162 | + include_once(GRAVITYVIEW_DIR.'includes/wordpress-widgets/register-wordpress-widgets.php'); |
|
| 163 | 163 | |
| 164 | 164 | // Load GravityView Widgets |
| 165 | - include_once( GRAVITYVIEW_DIR .'includes/widgets/register-gravityview-widgets.php' ); |
|
| 165 | + include_once(GRAVITYVIEW_DIR.'includes/widgets/register-gravityview-widgets.php'); |
|
| 166 | 166 | |
| 167 | 167 | // Add oEmbed |
| 168 | - include_once( GRAVITYVIEW_DIR . 'includes/class-oembed.php' ); |
|
| 168 | + include_once(GRAVITYVIEW_DIR.'includes/class-oembed.php'); |
|
| 169 | 169 | |
| 170 | 170 | // Add logging |
| 171 | - include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-logging.php' ); |
|
| 172 | - |
|
| 173 | - include_once( GRAVITYVIEW_DIR . 'includes/class-ajax.php' ); |
|
| 174 | - include_once( GRAVITYVIEW_DIR . 'includes/class-settings.php'); |
|
| 175 | - include_once( GRAVITYVIEW_DIR . 'includes/class-frontend-views.php' ); |
|
| 176 | - include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-admin-bar.php' ); |
|
| 177 | - include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-entry-list.php' ); |
|
| 178 | - include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-merge-tags.php'); /** @since 1.8.4 */ |
|
| 179 | - include_once( GRAVITYVIEW_DIR . 'includes/class-data.php' ); |
|
| 180 | - include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-shortcode.php' ); |
|
| 181 | - include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-entry-link-shortcode.php' ); |
|
| 182 | - include_once( GRAVITYVIEW_DIR . 'includes/class-gvlogic-shortcode.php' ); |
|
| 183 | - include_once( GRAVITYVIEW_DIR . 'includes/presets/register-default-templates.php' ); |
|
| 171 | + include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-logging.php'); |
|
| 172 | + |
|
| 173 | + include_once(GRAVITYVIEW_DIR.'includes/class-ajax.php'); |
|
| 174 | + include_once(GRAVITYVIEW_DIR.'includes/class-settings.php'); |
|
| 175 | + include_once(GRAVITYVIEW_DIR.'includes/class-frontend-views.php'); |
|
| 176 | + include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-admin-bar.php'); |
|
| 177 | + include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-entry-list.php'); |
|
| 178 | + include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-merge-tags.php'); /** @since 1.8.4 */ |
|
| 179 | + include_once(GRAVITYVIEW_DIR.'includes/class-data.php'); |
|
| 180 | + include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-shortcode.php'); |
|
| 181 | + include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-entry-link-shortcode.php'); |
|
| 182 | + include_once(GRAVITYVIEW_DIR.'includes/class-gvlogic-shortcode.php'); |
|
| 183 | + include_once(GRAVITYVIEW_DIR.'includes/presets/register-default-templates.php'); |
|
| 184 | 184 | |
| 185 | 185 | } |
| 186 | 186 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | * @return bool |
| 191 | 191 | */ |
| 192 | 192 | public static function is_network_activated() { |
| 193 | - return is_multisite() && ( function_exists('is_plugin_active_for_network') && is_plugin_active_for_network( 'gravityview/gravityview.php' ) ); |
|
| 193 | + return is_multisite() && (function_exists('is_plugin_active_for_network') && is_plugin_active_for_network('gravityview/gravityview.php')); |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | |
@@ -212,13 +212,13 @@ discard block |
||
| 212 | 212 | flush_rewrite_rules(); |
| 213 | 213 | |
| 214 | 214 | // Update the current GV version |
| 215 | - update_option( 'gv_version', self::version ); |
|
| 215 | + update_option('gv_version', self::version); |
|
| 216 | 216 | |
| 217 | 217 | // Add the transient to redirect to configuration page |
| 218 | - set_transient( '_gv_activation_redirect', true, 60 ); |
|
| 218 | + set_transient('_gv_activation_redirect', true, 60); |
|
| 219 | 219 | |
| 220 | 220 | // Clear settings transient |
| 221 | - delete_transient( 'redux_edd_license_license_valid' ); |
|
| 221 | + delete_transient('redux_edd_license_license_valid'); |
|
| 222 | 222 | |
| 223 | 223 | GravityView_Roles_Capabilities::get_instance()->add_caps(); |
| 224 | 224 | } |
@@ -244,8 +244,8 @@ discard block |
||
| 244 | 244 | * @return void |
| 245 | 245 | */ |
| 246 | 246 | public static function include_extension_framework() { |
| 247 | - if ( ! class_exists( 'GravityView_Extension' ) ) { |
|
| 248 | - require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-extension.php' ); |
|
| 247 | + if (!class_exists('GravityView_Extension')) { |
|
| 248 | + require_once(GRAVITYVIEW_DIR.'includes/class-gravityview-extension.php'); |
|
| 249 | 249 | } |
| 250 | 250 | } |
| 251 | 251 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * @since 1.7.5.1 |
| 256 | 256 | */ |
| 257 | 257 | public static function include_widget_class() { |
| 258 | - include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget.php' ); |
|
| 258 | + include_once(GRAVITYVIEW_DIR.'includes/widgets/class-gravityview-widget.php'); |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | |
@@ -267,17 +267,17 @@ discard block |
||
| 267 | 267 | */ |
| 268 | 268 | public function load_plugin_textdomain() { |
| 269 | 269 | |
| 270 | - $loaded = load_plugin_textdomain( 'gravityview', false, '/languages/' ); |
|
| 271 | - if ( ! $loaded ) { |
|
| 272 | - $loaded = load_muplugin_textdomain( 'gravityview', '/languages/' ); |
|
| 270 | + $loaded = load_plugin_textdomain('gravityview', false, '/languages/'); |
|
| 271 | + if (!$loaded) { |
|
| 272 | + $loaded = load_muplugin_textdomain('gravityview', '/languages/'); |
|
| 273 | 273 | } |
| 274 | - if ( ! $loaded ) { |
|
| 275 | - $loaded = load_theme_textdomain( 'gravityview', '/languages/' ); |
|
| 274 | + if (!$loaded) { |
|
| 275 | + $loaded = load_theme_textdomain('gravityview', '/languages/'); |
|
| 276 | 276 | } |
| 277 | - if ( ! $loaded ) { |
|
| 278 | - $locale = apply_filters( 'plugin_locale', get_locale(), 'gravityview' ); |
|
| 279 | - $mofile = dirname( __FILE__ ) . '/languages/gravityview-'. $locale .'.mo'; |
|
| 280 | - load_textdomain( 'gravityview', $mofile ); |
|
| 277 | + if (!$loaded) { |
|
| 278 | + $locale = apply_filters('plugin_locale', get_locale(), 'gravityview'); |
|
| 279 | + $mofile = dirname(__FILE__).'/languages/gravityview-'.$locale.'.mo'; |
|
| 280 | + load_textdomain('gravityview', $mofile); |
|
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | } |
@@ -289,9 +289,9 @@ discard block |
||
| 289 | 289 | */ |
| 290 | 290 | public static function is_admin() { |
| 291 | 291 | |
| 292 | - $doing_ajax = defined( 'DOING_AJAX' ) ? DOING_AJAX : false; |
|
| 292 | + $doing_ajax = defined('DOING_AJAX') ? DOING_AJAX : false; |
|
| 293 | 293 | |
| 294 | - return is_admin() && ! $doing_ajax; |
|
| 294 | + return is_admin() && !$doing_ajax; |
|
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | /** |
@@ -302,27 +302,27 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | public function frontend_actions() { |
| 304 | 304 | |
| 305 | - if( self::is_admin() ) { return; } |
|
| 305 | + if (self::is_admin()) { return; } |
|
| 306 | 306 | |
| 307 | - include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-image.php' ); |
|
| 308 | - include_once( GRAVITYVIEW_DIR .'includes/class-template.php' ); |
|
| 309 | - include_once( GRAVITYVIEW_DIR .'includes/class-api.php' ); |
|
| 310 | - include_once( GRAVITYVIEW_DIR .'includes/class-frontend-views.php' ); |
|
| 311 | - include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-change-entry-creator.php' ); |
|
| 307 | + include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-image.php'); |
|
| 308 | + include_once(GRAVITYVIEW_DIR.'includes/class-template.php'); |
|
| 309 | + include_once(GRAVITYVIEW_DIR.'includes/class-api.php'); |
|
| 310 | + include_once(GRAVITYVIEW_DIR.'includes/class-frontend-views.php'); |
|
| 311 | + include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-change-entry-creator.php'); |
|
| 312 | 312 | |
| 313 | 313 | |
| 314 | 314 | /** |
| 315 | 315 | * When an entry is created, check if we need to update the custom slug meta |
| 316 | 316 | * todo: move this to its own class.. |
| 317 | 317 | */ |
| 318 | - add_action( 'gform_entry_created', array( 'GravityView_API', 'entry_create_custom_slug' ), 10, 2 ); |
|
| 318 | + add_action('gform_entry_created', array('GravityView_API', 'entry_create_custom_slug'), 10, 2); |
|
| 319 | 319 | |
| 320 | 320 | /** |
| 321 | 321 | * @action `gravityview_include_frontend_actions` Triggered after all GravityView frontend files are loaded |
| 322 | 322 | * |
| 323 | 323 | * Nice place to insert extensions' frontend stuff |
| 324 | 324 | */ |
| 325 | - do_action( 'gravityview_include_frontend_actions' ); |
|
| 325 | + do_action('gravityview_include_frontend_actions'); |
|
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | /** |
@@ -332,15 +332,15 @@ discard block |
||
| 332 | 332 | */ |
| 333 | 333 | public static function get_default_widget_areas() { |
| 334 | 334 | $default_areas = array( |
| 335 | - array( '1-1' => array( array( 'areaid' => 'top', 'title' => __('Top', 'gravityview' ) , 'subtitle' => '' ) ) ), |
|
| 336 | - array( '1-2' => array( array( 'areaid' => 'left', 'title' => __('Left', 'gravityview') , 'subtitle' => '' ) ), '2-2' => array( array( 'areaid' => 'right', 'title' => __('Right', 'gravityview') , 'subtitle' => '' ) ) ), |
|
| 335 | + array('1-1' => array(array('areaid' => 'top', 'title' => __('Top', 'gravityview'), 'subtitle' => ''))), |
|
| 336 | + array('1-2' => array(array('areaid' => 'left', 'title' => __('Left', 'gravityview'), 'subtitle' => '')), '2-2' => array(array('areaid' => 'right', 'title' => __('Right', 'gravityview'), 'subtitle' => ''))), |
|
| 337 | 337 | ); |
| 338 | 338 | |
| 339 | 339 | /** |
| 340 | 340 | * @filter `gravityview_widget_active_areas` Array of zones available for widgets to be dropped into |
| 341 | 341 | * @param array $default_areas Definition for default widget areas |
| 342 | 342 | */ |
| 343 | - return apply_filters( 'gravityview_widget_active_areas', $default_areas ); |
|
| 343 | + return apply_filters('gravityview_widget_active_areas', $default_areas); |
|
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | /** DEBUG */ |
@@ -351,13 +351,13 @@ 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 |
| 358 | 358 | * @param mixed $data Supporting data to print alongside it |
| 359 | 359 | */ |
| 360 | - do_action( 'gravityview_log_debug', $message, $data ); |
|
| 360 | + do_action('gravityview_log_debug', $message, $data); |
|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | /** |
@@ -365,13 +365,13 @@ 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 |
| 372 | 372 | * @param mixed $data Supporting data to print alongside it |
| 373 | 373 | */ |
| 374 | - do_action( 'gravityview_log_error', $message, $data ); |
|
| 374 | + do_action('gravityview_log_error', $message, $data); |
|
| 375 | 375 | } |
| 376 | 376 | |
| 377 | 377 | } // end class GravityView_Plugin |
@@ -8,10 +8,10 @@ discard block |
||
| 8 | 8 | function __construct() { |
| 9 | 9 | |
| 10 | 10 | // Add Edit link to the entry actions |
| 11 | - add_action( 'gform_entries_first_column_actions', array( $this, 'add_edit_link' ), 10, 5 ); |
|
| 11 | + add_action('gform_entries_first_column_actions', array($this, 'add_edit_link'), 10, 5); |
|
| 12 | 12 | |
| 13 | 13 | // Add script to enable edit link |
| 14 | - add_action( 'admin_head-forms_page_gf_entries', array( $this, 'add_edit_script') ); |
|
| 14 | + add_action('admin_head-forms_page_gf_entries', array($this, 'add_edit_script')); |
|
| 15 | 15 | |
| 16 | 16 | } |
| 17 | 17 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | public function add_edit_script() { |
| 27 | 27 | |
| 28 | 28 | // We're on a single entry page, or at least not the Entries page. |
| 29 | - if( !empty( $_GET['view'] ) && $_GET['view'] !== 'entries' ) { return; } |
|
| 29 | + if (!empty($_GET['view']) && $_GET['view'] !== 'entries') { return; } |
|
| 30 | 30 | ?> |
| 31 | 31 | <script> |
| 32 | 32 | jQuery( document ).ready( function( $ ) { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @param array $lead The current entry data |
| 51 | 51 | * @param string $query_string URL query string for a link to the current entry. Missing the `?page=` part, which is strange. Example: `gf_entries&view=entry&id=35&lid=5212&filter=&paged=1` |
| 52 | 52 | */ |
| 53 | - function add_edit_link( $form_id = NULL, $field_id = NULL, $value = NULL, $lead = array(), $query_string = NULL ) { |
|
| 53 | + function add_edit_link($form_id = NULL, $field_id = NULL, $value = NULL, $lead = array(), $query_string = NULL) { |
|
| 54 | 54 | |
| 55 | 55 | $params = array( |
| 56 | 56 | 'page' => 'gf_entries', |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | <span class="edit edit_entry"> |
| 65 | 65 | | |
| 66 | - <a title="<?php esc_attr_e( 'Edit this entry', 'gravityview'); ?>" href="<?php echo esc_url( add_query_arg( $params, admin_url( 'admin.php?page='.$query_string ) ) ); ?>"><?php esc_html_e( 'Edit', 'gravityview' ); ?></a> |
|
| 66 | + <a title="<?php esc_attr_e('Edit this entry', 'gravityview'); ?>" href="<?php echo esc_url(add_query_arg($params, admin_url('admin.php?page='.$query_string))); ?>"><?php esc_html_e('Edit', 'gravityview'); ?></a> |
|
| 67 | 67 | </span> |
| 68 | 68 | <?php |
| 69 | 69 | } |
@@ -8,24 +8,24 @@ discard block |
||
| 8 | 8 | ?> |
| 9 | 9 | <label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"> |
| 10 | 10 | <?php $this->render_input(); ?> |
| 11 | - <?php echo $this->get_field_label() . $this->get_tooltip() . $this->get_field_desc(); ?> |
|
| 11 | + <?php echo $this->get_field_label().$this->get_tooltip().$this->get_field_desc(); ?> |
|
| 12 | 12 | </label> |
| 13 | 13 | <?php |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | - function render_setting( $override_input = NULL ) { |
|
| 16 | + function render_setting($override_input = NULL) { |
|
| 17 | 17 | |
| 18 | - if( $this->get_field_left_label() ) { ?> |
|
| 18 | + if ($this->get_field_left_label()) { ?> |
|
| 19 | 19 | |
| 20 | 20 | <td scope="row"> |
| 21 | 21 | <label for="<?php echo $this->get_field_id(); ?>"> |
| 22 | - <?php echo $this->get_field_left_label() . $this->get_tooltip(); ?> |
|
| 22 | + <?php echo $this->get_field_left_label().$this->get_tooltip(); ?> |
|
| 23 | 23 | </label> |
| 24 | 24 | </td> |
| 25 | 25 | <td> |
| 26 | 26 | <label> |
| 27 | - <?php $this->render_input( $override_input ); ?> |
|
| 28 | - <?php echo $this->get_field_label() . $this->get_tooltip() . $this->get_field_desc(); ?> |
|
| 27 | + <?php $this->render_input($override_input); ?> |
|
| 28 | + <?php echo $this->get_field_label().$this->get_tooltip().$this->get_field_desc(); ?> |
|
| 29 | 29 | </label> |
| 30 | 30 | </td> |
| 31 | 31 | |
@@ -33,23 +33,23 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | <td scope="row" colspan="2"> |
| 35 | 35 | <label for="<?php echo $this->get_field_id(); ?>"> |
| 36 | - <?php $this->render_input( $override_input ); ?> |
|
| 37 | - <?php echo $this->get_field_label() . $this->get_tooltip() . $this->get_field_desc(); ?> |
|
| 36 | + <?php $this->render_input($override_input); ?> |
|
| 37 | + <?php echo $this->get_field_label().$this->get_tooltip().$this->get_field_desc(); ?> |
|
| 38 | 38 | </label> |
| 39 | 39 | </td> |
| 40 | 40 | |
| 41 | 41 | <?php } |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - function render_input( $override_input = NULL ) { |
|
| 45 | - if( isset( $override_input ) ) { |
|
| 44 | + function render_input($override_input = NULL) { |
|
| 45 | + if (isset($override_input)) { |
|
| 46 | 46 | echo $override_input; |
| 47 | 47 | return; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | ?> |
| 51 | - <input name="<?php echo esc_attr( $this->name ); ?>" type="hidden" value="0" /> |
|
| 52 | - <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="checkbox" value="1" <?php checked( $this->value, '1', true ); ?> /> |
|
| 51 | + <input name="<?php echo esc_attr($this->name); ?>" type="hidden" value="0" /> |
|
| 52 | + <input name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>" type="checkbox" value="1" <?php checked($this->value, '1', true); ?> /> |
|
| 53 | 53 | <?php |
| 54 | 54 | } |
| 55 | 55 | |
@@ -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 ); ?>" /> |
@@ -8,17 +8,17 @@ |
||
| 8 | 8 | $this->render_input(); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | - function render_input( $override_input = null ) { |
|
| 11 | + function render_input($override_input = null) { |
|
| 12 | 12 | |
| 13 | - if( isset( $override_input ) ) { |
|
| 13 | + if (isset($override_input)) { |
|
| 14 | 14 | echo $override_input; |
| 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 | - <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 ); ?>" /> |
|
| 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); ?>" /> |
|
| 22 | 22 | <?php |
| 23 | 23 | } |
| 24 | 24 | |
@@ -3,13 +3,13 @@ discard block |
||
| 3 | 3 | * number input type |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | -if( !class_exists('GravityView_FieldType_text') ) { |
|
| 7 | - include_once( GRAVITYVIEW_DIR . 'includes/admin/field-types/type_text.php' ); |
|
| 6 | +if (!class_exists('GravityView_FieldType_text')) { |
|
| 7 | + include_once(GRAVITYVIEW_DIR.'includes/admin/field-types/type_text.php'); |
|
| 8 | 8 | } |
| 9 | 9 | class GravityView_FieldType_number extends GravityView_FieldType_text { |
| 10 | 10 | |
| 11 | - function render_input( $override_input = null ) { |
|
| 12 | - if( isset( $override_input ) ) { |
|
| 11 | + function render_input($override_input = null) { |
|
| 12 | + if (isset($override_input)) { |
|
| 13 | 13 | echo $override_input; |
| 14 | 14 | return; |
| 15 | 15 | } |
@@ -18,13 +18,13 @@ discard block |
||
| 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' ) { |
|
| 21 | + if ($show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force') { |
|
| 22 | 22 | $class = 'merge-tag-support mt-position-right mt-hide_all_fields '; |
| 23 | 23 | } |
| 24 | - $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; |
|
| 24 | + $class .= !empty($this->field['class']) ? $this->field['class'] : 'widefat'; |
|
| 25 | 25 | |
| 26 | 26 | ?> |
| 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 ); ?>"> |
|
| 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); ?>"> |
|
| 28 | 28 | <?php |
| 29 | 29 | } |
| 30 | 30 | |
@@ -28,10 +28,10 @@ |
||
| 28 | 28 | |
| 29 | 29 | $show_mt = $this->show_merge_tags(); |
| 30 | 30 | |
| 31 | - if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
| 32 | - $class = 'merge-tag-support mt-position-right mt-hide_all_fields '; |
|
| 33 | - } |
|
| 34 | - $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; |
|
| 31 | + if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
| 32 | + $class = 'merge-tag-support mt-position-right mt-hide_all_fields '; |
|
| 33 | + } |
|
| 34 | + $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; |
|
| 35 | 35 | |
| 36 | 36 | ?> |
| 37 | 37 | <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="text" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>"> |
@@ -18,15 +18,15 @@ |
||
| 18 | 18 | |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - function render_input( $override_input = null ) { |
|
| 22 | - if( isset( $override_input ) ) { |
|
| 21 | + function render_input($override_input = null) { |
|
| 22 | + if (isset($override_input)) { |
|
| 23 | 23 | echo $override_input; |
| 24 | 24 | return; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - foreach( $this->field['options'] as $value => $label ) : ?> |
|
| 27 | + foreach ($this->field['options'] as $value => $label) : ?> |
|
| 28 | 28 | <label class="<?php echo $this->get_label_class(); ?>"> |
| 29 | - <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>-<?php echo esc_attr( $value ); ?>" type="radio" value="<?php echo esc_attr( $value ); ?>" <?php checked( $value, $this->value, true ); ?> /> <?php echo esc_html( $label ); ?> |
|
| 29 | + <input name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>-<?php echo esc_attr($value); ?>" type="radio" value="<?php echo esc_attr($value); ?>" <?php checked($value, $this->value, true); ?> /> <?php echo esc_html($label); ?> |
|
| 30 | 30 | </label> |
| 31 | 31 | <?php |
| 32 | 32 | endforeach; |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | echo '<span class="gv-label">'.$this->get_field_label().'</span>'; |
| 12 | 12 | |
| 13 | - echo $this->get_tooltip() . $this->get_field_desc(); |
|
| 13 | + echo $this->get_tooltip().$this->get_field_desc(); |
|
| 14 | 14 | |
| 15 | 15 | $this->render_input(); |
| 16 | 16 | |
@@ -19,15 +19,15 @@ discard block |
||
| 19 | 19 | <?php |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - function render_input( $override_input = null ) { |
|
| 23 | - if( isset( $override_input ) ) { |
|
| 22 | + function render_input($override_input = null) { |
|
| 23 | + if (isset($override_input)) { |
|
| 24 | 24 | echo $override_input; |
| 25 | 25 | return; |
| 26 | 26 | } |
| 27 | 27 | ?> |
| 28 | - <select name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>"> |
|
| 29 | - <?php foreach( $this->field['options'] as $value => $label ) : ?> |
|
| 30 | - <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $this->value, true ); ?>><?php echo esc_html( $label ); ?></option> |
|
| 28 | + <select name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>"> |
|
| 29 | + <?php foreach ($this->field['options'] as $value => $label) : ?> |
|
| 30 | + <option value="<?php echo esc_attr($value); ?>" <?php selected($value, $this->value, true); ?>><?php echo esc_html($label); ?></option> |
|
| 31 | 31 | <?php endforeach; ?> |
| 32 | 32 | </select> |
| 33 | 33 | <?php |
@@ -28,10 +28,10 @@ |
||
| 28 | 28 | |
| 29 | 29 | $show_mt = $this->show_merge_tags(); |
| 30 | 30 | |
| 31 | - if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
| 32 | - $class = 'merge-tag-support mt-position-right mt-hide_all_fields '; |
|
| 33 | - } |
|
| 34 | - $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; |
|
| 31 | + if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
| 32 | + $class = 'merge-tag-support mt-position-right mt-hide_all_fields '; |
|
| 33 | + } |
|
| 34 | + $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; |
|
| 35 | 35 | |
| 36 | 36 | ?> |
| 37 | 37 | <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="text" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>"> |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | <label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php |
| 10 | 10 | |
| 11 | 11 | echo '<span class="gv-label">'.$this->get_field_label().'</span>'; |
| 12 | - echo $this->get_tooltip() . $this->get_field_desc(); |
|
| 12 | + echo $this->get_tooltip().$this->get_field_desc(); |
|
| 13 | 13 | ?><div> |
| 14 | 14 | <?php $this->render_input(); ?> |
| 15 | 15 | </div> |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | <?php |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | - function render_input( $override_input = null ) { |
|
| 20 | + function render_input($override_input = null) { |
|
| 21 | 21 | |
| 22 | - if( isset( $override_input ) ) { |
|
| 22 | + if (isset($override_input)) { |
|
| 23 | 23 | echo $override_input; |
| 24 | 24 | return; |
| 25 | 25 | } |
@@ -28,13 +28,13 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | $show_mt = $this->show_merge_tags(); |
| 30 | 30 | |
| 31 | - if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
| 31 | + if ($show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force') { |
|
| 32 | 32 | $class = 'merge-tag-support mt-position-right mt-hide_all_fields '; |
| 33 | 33 | } |
| 34 | - $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; |
|
| 34 | + $class .= !empty($this->field['class']) ? $this->field['class'] : 'widefat'; |
|
| 35 | 35 | |
| 36 | 36 | ?> |
| 37 | - <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="text" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>"> |
|
| 37 | + <input name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>" type="text" value="<?php echo esc_attr($this->value); ?>" class="<?php echo esc_attr($class); ?>"> |
|
| 38 | 38 | <?php |
| 39 | 39 | } |
| 40 | 40 | |
@@ -28,14 +28,14 @@ |
||
| 28 | 28 | |
| 29 | 29 | $show_mt = $this->show_merge_tags(); |
| 30 | 30 | |
| 31 | - if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
| 32 | - $class = ' merge-tag-support mt-position-right '; |
|
| 33 | - |
|
| 34 | - if( empty( $this->field['show_all_fields'] ) ) { |
|
| 35 | - $class .= ' mt-hide_all_fields'; |
|
| 36 | - } |
|
| 37 | - } |
|
| 38 | - $class .= !empty( $this->field['class'] ) ? 'widefat ' . $this->field['class'] : 'widefat'; |
|
| 31 | + if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
| 32 | + $class = ' merge-tag-support mt-position-right '; |
|
| 33 | + |
|
| 34 | + if( empty( $this->field['show_all_fields'] ) ) { |
|
| 35 | + $class .= ' mt-hide_all_fields'; |
|
| 36 | + } |
|
| 37 | + } |
|
| 38 | + $class .= !empty( $this->field['class'] ) ? 'widefat ' . $this->field['class'] : 'widefat'; |
|
| 39 | 39 | |
| 40 | 40 | ?> |
| 41 | 41 | <textarea name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo esc_attr( $class ); ?>" rows="5"><?php echo esc_textarea( $this->value ); ?></textarea> |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | <label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php |
| 11 | 11 | |
| 12 | 12 | echo '<span class="gv-label">'.$this->get_field_label().'</span>'; |
| 13 | - echo $this->get_tooltip() . $this->get_field_desc(); |
|
| 13 | + echo $this->get_tooltip().$this->get_field_desc(); |
|
| 14 | 14 | ?><div> |
| 15 | 15 | <?php $this->render_input(); ?> |
| 16 | 16 | </div> |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | <?php |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - function render_input( $override_input = null ) { |
|
| 22 | - if( isset( $override_input ) ) { |
|
| 21 | + function render_input($override_input = null) { |
|
| 22 | + if (isset($override_input)) { |
|
| 23 | 23 | echo $override_input; |
| 24 | 24 | return; |
| 25 | 25 | } |
@@ -28,17 +28,17 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | $show_mt = $this->show_merge_tags(); |
| 30 | 30 | |
| 31 | - if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
| 31 | + if ($show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force') { |
|
| 32 | 32 | $class = ' merge-tag-support mt-position-right '; |
| 33 | 33 | |
| 34 | - if( empty( $this->field['show_all_fields'] ) ) { |
|
| 34 | + if (empty($this->field['show_all_fields'])) { |
|
| 35 | 35 | $class .= ' mt-hide_all_fields'; |
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | - $class .= !empty( $this->field['class'] ) ? 'widefat ' . $this->field['class'] : 'widefat'; |
|
| 38 | + $class .= !empty($this->field['class']) ? 'widefat '.$this->field['class'] : 'widefat'; |
|
| 39 | 39 | |
| 40 | 40 | ?> |
| 41 | - <textarea name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo esc_attr( $class ); ?>" rows="5"><?php echo esc_textarea( $this->value ); ?></textarea> |
|
| 41 | + <textarea name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo esc_attr($class); ?>" rows="5"><?php echo esc_textarea($this->value); ?></textarea> |
|
| 42 | 42 | <?php |
| 43 | 43 | } |
| 44 | 44 | |