Completed
Push — develop ( 87b48c...882b48 )
by Gennady
23:47 queued 03:49
created
future/includes/class-gv-collection-entry-filter-gravityforms.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@
 block discarded – undo
55 55
 						$search_criteria[ $key ] = $field_filters;
56 56
 					}
57 57
 
58
-					if ( ! empty( $b[ $key ]['mode'] ) ) {
59
-						$search_criteria[ $key ]['mode' ] = $b[ $key ]['mode'];
60
-					} else if ( ! empty( $a[ $key ]['mode'] ) ) {
61
-						$search_criteria[ $key ]['mode' ] = $a[ $key ]['mode'];
58
+					if ( ! empty( $b[ $key ][ 'mode' ] ) ) {
59
+						$search_criteria[ $key ][ 'mode' ] = $b[ $key ][ 'mode' ];
60
+					} else if ( ! empty( $a[ $key ][ 'mode' ] ) ) {
61
+						$search_criteria[ $key ][ 'mode' ] = $a[ $key ][ 'mode' ];
62 62
 					}
63 63
 					break;
64 64
 				case 'start_date':
Please login to merge, or discard this patch.
includes/plugin-and-theme-hooks/class-gravityview-theme-hooks-rcp.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 	 */
24 24
 	protected $script_handles = array(
25 25
 		'rcp-admin-scripts',
26
-	    'bbq',
26
+		'bbq',
27 27
 	);
28 28
 
29 29
 	/**
Please login to merge, or discard this patch.
includes/class-gravityview-logging.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
 		add_action( 'gravityview_log_debug', array( $this, 'log_debug'), 10, 2 );
13 13
 
14 14
 		// Enable debug with Gravity Forms Logging Add-on
15
-	    add_filter( 'gform_logging_supported', array( $this, 'enable_gform_logging' ) );
15
+		add_filter( 'gform_logging_supported', array( $this, 'enable_gform_logging' ) );
16 16
 
17
-	    // Load Debug Bar integration
18
-	    add_filter( 'debug_bar_panels', array( $this, 'add_debug_bar' ) );
17
+		// Load Debug Bar integration
18
+		add_filter( 'debug_bar_panels', array( $this, 'add_debug_bar' ) );
19 19
 
20 20
 	}
21 21
 
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 	 * @param array $supported_plugins List of plugins
45 45
 	 */
46 46
 	public function enable_gform_logging( $supported_plugins ) {
47
-	    $supported_plugins['gravityview'] = 'GravityView';
48
-	    return $supported_plugins;
47
+		$supported_plugins['gravityview'] = 'GravityView';
48
+		return $supported_plugins;
49 49
 	}
50 50
 
51 51
 	/**
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 
97 97
 		if ( class_exists("GFLogging") ) {
98 98
 			GFLogging::include_logger();
99
-	        GFLogging::log_message( 'gravityview', $function( $message, true ) . $function($data, true), KLogger::DEBUG );
100
-	    }
99
+			GFLogging::log_message( 'gravityview', $function( $message, true ) . $function($data, true), KLogger::DEBUG );
100
+		}
101 101
 	}
102 102
 
103 103
 	static function log_error( $message = '', $data = null  ) {
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 		}
116 116
 
117 117
 		if ( class_exists("GFLogging") ) {
118
-		    GFLogging::include_logger();
119
-		    GFLogging::log_message( 'gravityview', $function ( $message, true ) . $function ( $error, true), KLogger::ERROR );
118
+			GFLogging::include_logger();
119
+			GFLogging::log_message( 'gravityview', $function ( $message, true ) . $function ( $error, true), KLogger::ERROR );
120 120
 		}
121 121
 	}
122 122
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
 
8 8
 	function __construct() {
9 9
 
10
-		add_action( 'gravityview_log_error', array( $this, 'log_error'), 10, 2 );
10
+		add_action( 'gravityview_log_error', array( $this, 'log_error' ), 10, 2 );
11 11
 
12
-		add_action( 'gravityview_log_debug', array( $this, 'log_debug'), 10, 2 );
12
+		add_action( 'gravityview_log_debug', array( $this, 'log_debug' ), 10, 2 );
13 13
 
14 14
 		// Enable debug with Gravity Forms Logging Add-on
15 15
 	    add_filter( 'gform_logging_supported', array( $this, 'enable_gform_logging' ) );
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 			include_once( GRAVITYVIEW_DIR . 'includes/class-debug-bar.php' );
35 35
 		}
36 36
 
37
-		$panels[] = new GravityView_Debug_Bar;
37
+		$panels[ ] = new GravityView_Debug_Bar;
38 38
 
39 39
 		return $panels;
40 40
 	}
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 * @param array $supported_plugins List of plugins
45 45
 	 */
46 46
 	public function enable_gform_logging( $supported_plugins ) {
47
-	    $supported_plugins['gravityview'] = 'GravityView';
47
+	    $supported_plugins[ 'gravityview' ] = 'GravityView';
48 48
 	    return $supported_plugins;
49 49
 	}
50 50
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 * @return string "print_r" or "var_export"
73 73
 	 */
74 74
 	static function get_print_function() {
75
-		if( ob_get_level() > 0 ) {
75
+		if ( ob_get_level() > 0 ) {
76 76
 			$function = 'var_export';
77 77
 		} else {
78 78
 			$function = 'print_r';
@@ -90,17 +90,17 @@  discard block
 block discarded – undo
90 90
 			'data' => $data,
91 91
 		);
92 92
 
93
-		if( !in_array( $notice, self::$notices ) ) {
94
-			self::$notices[] = $notice;
93
+		if ( ! in_array( $notice, self::$notices ) ) {
94
+			self::$notices[ ] = $notice;
95 95
 		}
96 96
 
97
-		if ( class_exists("GFLogging") ) {
97
+		if ( class_exists( "GFLogging" ) ) {
98 98
 			GFLogging::include_logger();
99
-	        GFLogging::log_message( 'gravityview', $function( $message, true ) . $function($data, true), KLogger::DEBUG );
99
+	        GFLogging::log_message( 'gravityview', $function( $message, true ) . $function( $data, true ), KLogger::DEBUG );
100 100
 	    }
101 101
 	}
102 102
 
103
-	static function log_error( $message = '', $data = null  ) {
103
+	static function log_error( $message = '', $data = null ) {
104 104
 
105 105
 		$function = self::get_print_function();
106 106
 
@@ -110,13 +110,13 @@  discard block
 block discarded – undo
110 110
 			'backtrace' => function_exists( 'wp_debug_backtrace_summary' ) ? wp_debug_backtrace_summary( null, 3 ) : '',
111 111
 		);
112 112
 
113
-		if( !in_array( $error, self::$errors ) ) {
114
-			self::$errors[] = $error;
113
+		if ( ! in_array( $error, self::$errors ) ) {
114
+			self::$errors[ ] = $error;
115 115
 		}
116 116
 
117
-		if ( class_exists("GFLogging") ) {
117
+		if ( class_exists( "GFLogging" ) ) {
118 118
 		    GFLogging::include_logger();
119
-		    GFLogging::log_message( 'gravityview', $function ( $message, true ) . $function ( $error, true), KLogger::ERROR );
119
+		    GFLogging::log_message( 'gravityview', $function( $message, true ) . $function( $error, true ), KLogger::ERROR );
120 120
 		}
121 121
 	}
122 122
 
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-date.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@
 block discarded – undo
11 11
 ?>
12 12
 
13 13
 <div class="gv-search-box gv-search-date">
14
-	<?php if( ! gv_empty( $search_field['label'], false, false ) ) { ?>
15
-	<label for="search-box-<?php echo esc_attr( $search_field['name'] ); ?>"><?php echo esc_html( $search_field['label'] ); ?></label>
14
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
15
+	<label for="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>"><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
16 16
 	<?php } ?>
17 17
 	<p>
18
-		<input type="text" name="<?php echo esc_attr( $search_field['name'] ); ?>" id="search-box-<?php echo esc_attr( $search_field['name'] ); ?>" value="<?php echo esc_attr( $search_field['value'] ); ?>" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" >
18
+		<input type="text" name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" id="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>" value="<?php echo esc_attr( $search_field[ 'value' ] ); ?>" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" >
19 19
 	</p>
20 20
 </div>
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-input_text.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
 
11 11
 ?>
12 12
 <div class="gv-search-box gv-search-field-text">
13
-	<?php if( ! gv_empty( $search_field['label'], false, false ) ) { ?>
14
-	<label for="search-box-<?php echo esc_attr( $search_field['name'] ); ?>"><?php echo esc_html( $search_field['label'] ); ?></label>
13
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
14
+	<label for="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>"><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
15 15
 	<?php } ?>
16 16
 	<p>
17
-		<input type="text" name="<?php echo esc_attr( $search_field['name'] ); ?>" id="search-box-<?php echo esc_attr( $search_field['name'] ); ?>" value="<?php echo esc_attr( $search_field['value'] ); ?>">
17
+		<input type="text" name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" id="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>" value="<?php echo esc_attr( $search_field[ 'value' ] ); ?>">
18 18
 	</p>
19 19
 </div>
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-single_checkbox.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
 ?>
13 13
 
14 14
 <div class="gv-search-box gv-search-field-single_checkbox">
15
-	<label for="search-box-<?php echo esc_attr( $search_field['name'] ); ?>" class="gv-check-radio">
16
-		<input type="checkbox" name="<?php echo esc_attr( $search_field['name'] ); ?>" value="1" id="search-box-<?php echo esc_attr( $search_field['name'] ); ?>" <?php checked( '1', $search_field['value'], true ); ?>>
17
-			<?php if( ! gv_empty( $search_field['label'], false, false ) ) { echo esc_html(  $search_field['label'] ); } ?>
15
+	<label for="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>" class="gv-check-radio">
16
+		<input type="checkbox" name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" value="1" id="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>" <?php checked( '1', $search_field[ 'value' ], true ); ?>>
17
+			<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { echo esc_html( $search_field[ 'label' ] ); } ?>
18 18
 	</label>
19 19
 </div>
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
plugin-and-theme-hooks/class-gravityview-plugin-hooks-elegant-themes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 		}
80 80
 
81 81
 		$sidebars_widgets = wp_get_sidebars_widgets();
82
-		if ( empty( $sidebars_widgets[ $matches[1] ] ) ) {
82
+		if ( empty( $sidebars_widgets[ $matches[ 1 ] ] ) ) {
83 83
 			return $shortcodes;
84 84
 		}
85 85
 
86
-		foreach ( $sidebars_widgets[ $matches[1] ] as $widgets ) {
86
+		foreach ( $sidebars_widgets[ $matches[ 1 ] ] as $widgets ) {
87 87
 			if (
88 88
 				/**
89 89
 				 * Blacklisted widgets.
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 				strpos( $widgets, 'gv_recent_entries' ) === 0
93 93
 			) {
94 94
 
95
-					$shortcodes []= 'et_pb_sidebar';
95
+					$shortcodes [ ] = 'et_pb_sidebar';
96 96
 					break;
97 97
 			}
98 98
 		}
Please login to merge, or discard this patch.
includes/class-gravityview-html-elements.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -42,16 +42,16 @@  discard block
 block discarded – undo
42 42
 
43 43
 		$args = wp_parse_args( $args, $defaults );
44 44
 
45
-		$forms = gravityview_get_forms( (bool) $args['active'], (bool) $args['trash'] );
45
+		$forms = gravityview_get_forms( (bool)$args[ 'active' ], (bool)$args[ 'trash' ] );
46 46
 
47
-		if( array() === $args['options'] ) {
47
+		if ( array() === $args[ 'options' ] ) {
48 48
 			foreach ( $forms as $form ) {
49 49
 
50
-				if ( in_array( $form['id'], $args['exclude'] ) ) {
50
+				if ( in_array( $form[ 'id' ], $args[ 'exclude' ] ) ) {
51 51
 					continue;
52 52
 				}
53 53
 
54
-				$args['options'][ $form['id'] ] = esc_html( $form['title'] );
54
+				$args[ 'options' ][ $form[ 'id' ] ] = esc_html( $form[ 'title' ] );
55 55
 			}
56 56
 		}
57 57
 
@@ -83,15 +83,15 @@  discard block
 block discarded – undo
83 83
 
84 84
 		$args = wp_parse_args( $args, $defaults );
85 85
 
86
-		if( empty( $args['form_id'] ) ) {
86
+		if ( empty( $args[ 'form_id' ] ) ) {
87 87
 			return '';
88 88
 		}
89 89
 
90
-		$fields = GVCommon::get_sortable_fields_array( $args['form_id'] );
90
+		$fields = GVCommon::get_sortable_fields_array( $args[ 'form_id' ] );
91 91
 
92
-		if( array() === $args['options'] ) {
92
+		if ( array() === $args[ 'options' ] ) {
93 93
 			foreach ( $fields as $field_id => $field ) {
94
-				$args['options'][ $field_id ] = esc_html( $field['label'] );
94
+				$args[ 'options' ][ $field_id ] = esc_html( $field[ 'label' ] );
95 95
 			}
96 96
 		}
97 97
 
@@ -127,43 +127,43 @@  discard block
 block discarded – undo
127 127
 		$args = wp_parse_args( $args, $defaults );
128 128
 
129 129
 		$data_elements = '';
130
-		foreach ( $args['data'] as $key => $value ) {
130
+		foreach ( $args[ 'data' ] as $key => $value ) {
131 131
 			$data_elements .= ' data-' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"';
132 132
 		}
133 133
 
134
-		if( $args['multiple'] ) {
134
+		if ( $args[ 'multiple' ] ) {
135 135
 			$multiple = ' MULTIPLE';
136 136
 		} else {
137 137
 			$multiple = '';
138 138
 		}
139 139
 
140
-		if( $args['placeholder'] ) {
141
-			$placeholder = $args['placeholder'];
140
+		if ( $args[ 'placeholder' ] ) {
141
+			$placeholder = $args[ 'placeholder' ];
142 142
 		} else {
143 143
 			$placeholder = '';
144 144
 		}
145 145
 
146
-		$disabled = $args['disabled'] ? ' disabled="disabled"' : '';
147
-		$class  = implode( ' ', array_map( 'sanitize_html_class', explode( ' ', $args['class'] ) ) );
148
-		$output = '<select name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( str_replace( '-', '_', $args['id'] ) ) . '" class="gravityview-select ' . $class . '"' . $multiple . $disabled . ' data-placeholder="' . $placeholder . '"'. $data_elements . '>';
146
+		$disabled = $args[ 'disabled' ] ? ' disabled="disabled"' : '';
147
+		$class  = implode( ' ', array_map( 'sanitize_html_class', explode( ' ', $args[ 'class' ] ) ) );
148
+		$output = '<select name="' . esc_attr( $args[ 'name' ] ) . '" id="' . esc_attr( str_replace( '-', '_', $args[ 'id' ] ) ) . '" class="gravityview-select ' . $class . '"' . $multiple . $disabled . ' data-placeholder="' . $placeholder . '"' . $data_elements . '>';
149 149
 
150
-		if ( ! empty( $args['options'] ) ) {
150
+		if ( ! empty( $args[ 'options' ] ) ) {
151 151
 
152
-			if ( $args['show_option_none'] ) {
153
-				if( $args['multiple'] ) {
154
-					$selected = selected( true, in_array( -1, $args['selected'] ), false );
152
+			if ( $args[ 'show_option_none' ] ) {
153
+				if ( $args[ 'multiple' ] ) {
154
+					$selected = selected( true, in_array( -1, $args[ 'selected' ] ), false );
155 155
 				} else {
156
-					$selected = selected( $args['selected'], -1, false );
156
+					$selected = selected( $args[ 'selected' ], -1, false );
157 157
 				}
158
-				$output .= '<option value="-1"' . $selected . '>' . esc_html( $args['show_option_none'] ) . '</option>';
158
+				$output .= '<option value="-1"' . $selected . '>' . esc_html( $args[ 'show_option_none' ] ) . '</option>';
159 159
 			}
160 160
 
161
-			foreach( $args['options'] as $key => $option ) {
161
+			foreach ( $args[ 'options' ] as $key => $option ) {
162 162
 
163
-				if( $args['multiple'] && is_array( $args['selected'] ) ) {
164
-					$selected = selected( true, in_array( $key, $args['selected'], true ), false );
163
+				if ( $args[ 'multiple' ] && is_array( $args[ 'selected' ] ) ) {
164
+					$selected = selected( true, in_array( $key, $args[ 'selected' ], true ), false );
165 165
 				} else {
166
-					$selected = selected( $args['selected'], $key, false );
166
+					$selected = selected( $args[ 'selected' ], $key, false );
167 167
 				}
168 168
 
169 169
 				$output .= '<option value="' . esc_attr( $key ) . '"' . $selected . '>' . esc_html( $option ) . '</option>';
Please login to merge, or discard this patch.
plugin-and-theme-hooks/class-gravityview-plugin-hooks-ultimate-member.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
 	function parse_um_profile_post_content( $args = array() ) {
44 44
 		global $ultimatemember;
45 45
 
46
-		if( ! $ultimatemember || ! is_object( $ultimatemember ) || ! class_exists( 'GravityView_View_Data' ) ) {
46
+		if ( ! $ultimatemember || ! is_object( $ultimatemember ) || ! class_exists( 'GravityView_View_Data' ) ) {
47 47
 			return;
48 48
 		}
49 49
 
50 50
 		// @todo Support Ultimate Member 2.0 - for now, prevent fatal error
51
-		if( ! isset( $ultimatemember->profile ) ) {
51
+		if ( ! isset( $ultimatemember->profile ) ) {
52 52
 			return;
53 53
 		}
54 54
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 			return;
65 65
 		}
66 66
 
67
-		GravityView_View_Data::getInstance()->parse_post_content( $active_tab[0]->post_content );
67
+		GravityView_View_Data::getInstance()->parse_post_content( $active_tab[ 0 ]->post_content );
68 68
 
69 69
 		wp_reset_postdata();
70 70
 	}
Please login to merge, or discard this patch.