Completed
Pull Request — develop (#1484)
by Zack
07:48
created
plugin-and-theme-hooks/class-gravityview-plugin-hooks-gravity-flow.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
 		parent::add_hooks();
35 35
 
36
-		add_filter( 'gravityview/search/searchable_fields', array( $this, 'modify_search_bar_fields_dropdown'), 10, 2 );
36
+		add_filter( 'gravityview/search/searchable_fields', array( $this, 'modify_search_bar_fields_dropdown' ), 10, 2 );
37 37
 
38 38
 		add_filter( 'gravityview/admin/available_fields', array( $this, 'maybe_add_non_default_fields' ), 10, 3 );
39 39
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 * @return void
54 54
 	 */
55 55
 	public function clear_cache_after_workflow( $form, $entry_id, $step_id, $starting_step_id ) {
56
-		do_action( 'gravityview_clear_form_cache', $form['id'] );
56
+		do_action( 'gravityview_clear_form_cache', $form[ 'id' ] );
57 57
 	}
58 58
 
59 59
 	/**
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public static function get_status_options( $form_id = 0, $status_key = 'workflow_final_status' ) {
72 72
 
73
-		if( empty( $form_id ) ) {
73
+		if ( empty( $form_id ) ) {
74 74
 			$form_id = GravityView_View::getInstance()->getFormId();
75 75
 		}
76 76
 
77 77
 		$entry_meta = gravity_flow()->get_entry_meta( array(), $form_id );
78 78
 
79
-		return (array) \GV\Utils::get( $entry_meta, $status_key . '/filter/choices' );
79
+		return (array)\GV\Utils::get( $entry_meta, $status_key . '/filter/choices' );
80 80
 	}
81 81
 
82 82
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 		$workflow_steps = $GFlow->get_steps();
100 100
 
101
-		if( $workflow_steps ) {
101
+		if ( $workflow_steps ) {
102 102
 
103 103
 			foreach ( $workflow_steps as $step ) {
104 104
 
@@ -110,12 +110,12 @@  discard block
 block discarded – undo
110 110
 				);
111 111
 			}
112 112
 
113
-			$fields['workflow_step'] = array(
113
+			$fields[ 'workflow_step' ] = array(
114 114
 				'label' => esc_html__( 'Workflow Step', 'gravityview' ),
115 115
 				'type'  => 'select',
116 116
 			);
117 117
 
118
-			$fields['workflow_final_status'] = array(
118
+			$fields[ 'workflow_final_status' ] = array(
119 119
 				'label' => esc_html__( 'Workflow Status', 'gravityview' ),
120 120
 				'type'  => 'select',
121 121
 			);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		if ( ( $insert_at = array_search( 'workflow_final_status', wp_list_pluck( $fields, 'key' ) ) ) !== false ) {
132 132
 			$fields_end = array_splice( $fields, $insert_at + 1 );
133 133
 
134
-			$fields[] = array(
134
+			$fields[ ] = array(
135 135
 				'text' => __( 'Workflow Current Status Timestamp', 'gravityview' ),
136 136
 				'operators' => array( '>', '<' ),
137 137
 				'placeholder' => 'yyyy-mm-dd',
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
 				$keys_end = array_splice( $keys, $insert_at + 1 );
158 158
 				$values_end = array_splice( $values, $insert_at + 1 );
159 159
 
160
-				$keys[] = 'workflow_current_status_timestamp';
161
-				$values[] = array(
160
+				$keys[ ] = 'workflow_current_status_timestamp';
161
+				$values[ ] = array(
162 162
 					'label' => __( 'Workflow Current Status Timestamp', 'gravityview' ),
163 163
 					'type' => 'workflow_current_status_timestamp',
164 164
 				);
Please login to merge, or discard this patch.
includes/extensions/lightbox/class-gravityview-lightbox-provider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 		add_filter( 'gravityview/fields/fileupload/link_atts', array( $this, 'fileupload_link_atts' ), 10, 3 );
24 24
 		add_filter( 'gravityview/get_link/allowed_atts', array( $this, 'allowed_atts' ) );
25 25
 
26
-		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts') );
27
-		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles') );
26
+		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
27
+		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
28 28
 
29 29
 		add_action( 'wp_footer', array( $this, 'output_footer' ) );
30 30
 	}
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 		remove_filter( 'gravityview/fields/fileupload/link_atts', array( $this, 'fileupload_link_atts' ), 10 );
45 45
 		remove_filter( 'gravityview/get_link/allowed_atts', array( $this, 'allowed_atts' ) );
46 46
 
47
-		remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts') );
48
-		remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles') );
47
+		remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
48
+		remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
49 49
 
50 50
 		remove_action( 'wp_footer', array( $this, 'output_footer' ) );
51 51
 	}
Please login to merge, or discard this patch.
includes/extensions/lightbox/class-gravityview-lightbox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	public function set_provider( $provider = null ) {
40 40
 
41
-		if( gravityview()->request->is_admin() ) {
41
+		if ( gravityview()->request->is_admin() ) {
42 42
 			return;
43 43
 		}
44 44
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		}
58 58
 
59 59
 		// We're switching providers; remove the hooks that were added.
60
-		if( self::$active_provider ) {
60
+		if ( self::$active_provider ) {
61 61
 			self::$active_provider->remove_hooks();
62 62
 		}
63 63
 
Please login to merge, or discard this patch.
lightbox/fancybox/class-gravityview-lightbox-provider-fancybox.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -102,17 +102,17 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	public function allowed_atts( $atts = array() ) {
104 104
 
105
-		$atts['data-fancybox']         = null;
106
-		$atts['data-fancybox-trigger'] = null;
107
-		$atts['data-fancybox-index']   = null;
108
-		$atts['data-src']              = null;
109
-		$atts['data-type']             = null;
110
-		$atts['data-width']            = null;
111
-		$atts['data-height']           = null;
112
-		$atts['data-srcset']           = null;
113
-		$atts['data-caption']          = null;
114
-		$atts['data-options']          = null;
115
-		$atts['data-filter']           = null;
105
+		$atts[ 'data-fancybox' ]         = null;
106
+		$atts[ 'data-fancybox-trigger' ] = null;
107
+		$atts[ 'data-fancybox-index' ]   = null;
108
+		$atts[ 'data-src' ]              = null;
109
+		$atts[ 'data-type' ]             = null;
110
+		$atts[ 'data-width' ]            = null;
111
+		$atts[ 'data-height' ]           = null;
112
+		$atts[ 'data-srcset' ]           = null;
113
+		$atts[ 'data-caption' ]          = null;
114
+		$atts[ 'data-options' ]          = null;
115
+		$atts[ 'data-filter' ]           = null;
116 116
 
117 117
 		return $atts;
118 118
 	}
@@ -126,14 +126,14 @@  discard block
 block discarded – undo
126 126
 			return $link_atts;
127 127
 		}
128 128
 
129
-		$link_atts['class'] = \GV\Utils::get( $link_atts, 'class' ) . ' gravityview-fancybox';
129
+		$link_atts[ 'class' ] = \GV\Utils::get( $link_atts, 'class' ) . ' gravityview-fancybox';
130 130
 
131
-		$link_atts['class'] = sanitize_html_class( $link_atts['class'] );
131
+		$link_atts[ 'class' ] = sanitize_html_class( $link_atts[ 'class' ] );
132 132
 
133 133
 		if ( $context && ! empty( $context->field->field ) ) {
134 134
 			if ( $context->field->field->multipleFiles ) {
135 135
 				$entry = $context->entry->as_entry();
136
-				$link_atts['data-fancybox'] = 'gallery-' . sprintf( "%s-%s-%s", $entry['form_id'], $context->field->ID, $context->entry->get_slug() );
136
+				$link_atts[ 'data-fancybox' ] = 'gallery-' . sprintf( "%s-%s-%s", $entry[ 'form_id' ], $context->field->ID, $context->entry->get_slug() );
137 137
 			}
138 138
 		}
139 139
 
Please login to merge, or discard this patch.