Completed
Pull Request — master (#605)
by Zack
05:45
created
includes/admin/entry-list.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
includes/admin/field-types/type_checkbox.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,24 +8,24 @@  discard block
 block discarded – undo
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
-			&nbsp;<?php echo $this->get_field_label() . $this->get_tooltip() . $this->get_field_desc(); ?>
11
+			&nbsp;<?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
-				&nbsp;<?php echo $this->get_field_label() . $this->get_tooltip() . $this->get_field_desc(); ?>
27
+				<?php $this->render_input($override_input); ?>
28
+				&nbsp;<?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
 block discarded – undo
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
-					&nbsp;<?php echo $this->get_field_label() . $this->get_tooltip() . $this->get_field_desc(); ?>
36
+					<?php $this->render_input($override_input); ?>
37
+					&nbsp;<?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
 
Please login to merge, or discard this patch.
includes/admin/field-types/type_hidden.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/admin/field-types/type_number.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/admin/field-types/type_radio.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@
 block discarded – undo
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 ); ?> />&nbsp;<?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); ?> />&nbsp;<?php echo esc_html($label); ?>
30 30
 		</label>
31 31
 <?php
32 32
 		endforeach;
Please login to merge, or discard this patch.
includes/admin/field-types/type_select.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
includes/admin/field-types/type_text.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/admin/field-types/type_textarea.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/admin/metaboxes/class-gravityview-metabox-tabs.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 	 *
25 25
 	 * @return void
26 26
 	 */
27
-	public static function add( GravityView_Metabox_Tab $meta_box ) {
28
-		self::$meta_boxes[ $meta_box->id ] = $meta_box;
27
+	public static function add(GravityView_Metabox_Tab $meta_box) {
28
+		self::$meta_boxes[$meta_box->id] = $meta_box;
29 29
 	}
30 30
 
31 31
 	/**
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 	 *
38 38
 	 * @return void
39 39
 	 */
40
-	public static function remove( $meta_box_id ) {
41
-		if ( array_key_exists( $meta_box_id, self::$meta_boxes ) ) {
42
-			unset( self::$meta_boxes[ $meta_box_id ] );
40
+	public static function remove($meta_box_id) {
41
+		if (array_key_exists($meta_box_id, self::$meta_boxes)) {
42
+			unset(self::$meta_boxes[$meta_box_id]);
43 43
 		}
44 44
 	}
45 45
 
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
 	 *
53 53
 	 * @return bool|GravityView_Metabox_Tab False if none exist at the key $id; GravityView_Metabox_Tab if exists.
54 54
 	 */
55
-	public static function get( $id ) {
56
-		if ( empty( self::$meta_boxes ) || empty( self::$meta_boxes[ $id ] ) ) {
55
+	public static function get($id) {
56
+		if (empty(self::$meta_boxes) || empty(self::$meta_boxes[$id])) {
57 57
 			return false;
58 58
 		}
59 59
 
60
-		return self::$meta_boxes[ $id ];
60
+		return self::$meta_boxes[$id];
61 61
 	}
62 62
 
63 63
 	/**
Please login to merge, or discard this patch.