Completed
Push — develop ( 5570a4...397201 )
by Gennady
20:15
created
plugin-and-theme-hooks/class-gravityview-plugin-hooks-gravity-flow.php 1 patch
Spacing   +8 added lines, -8 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
 
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public static function get_status_options( $form_id = 0, $status_key = 'workflow_final_status' ) {
56 56
 
57
-		if( empty( $form_id ) ) {
57
+		if ( empty( $form_id ) ) {
58 58
 			$form_id = GravityView_View::getInstance()->getFormId();
59 59
 		}
60 60
 
61 61
 		$entry_meta = gravity_flow()->get_entry_meta( array(), $form_id );
62 62
 
63
-		return (array) \GV\Utils::get( $entry_meta, $status_key . '/filter/choices' );
63
+		return (array)\GV\Utils::get( $entry_meta, $status_key . '/filter/choices' );
64 64
 	}
65 65
 
66 66
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 		$workflow_steps = $GFlow->get_steps();
84 84
 
85
-		if( $workflow_steps ) {
85
+		if ( $workflow_steps ) {
86 86
 
87 87
 			foreach ( $workflow_steps as $step ) {
88 88
 
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
 				);
95 95
 			}
96 96
 
97
-			$fields['workflow_step'] = array(
97
+			$fields[ 'workflow_step' ] = array(
98 98
 				'label' => esc_html__( 'Workflow Step', 'gravityview' ),
99 99
 				'type'  => 'select',
100 100
 			);
101 101
 
102
-			$fields['workflow_final_status'] = array(
102
+			$fields[ 'workflow_final_status' ] = array(
103 103
 				'label' => esc_html__( 'Workflow Status', 'gravityview' ),
104 104
 				'type'  => 'select',
105 105
 			);
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
 				$keys_end = array_splice( $keys, $insert_at + 1 );
118 118
 				$values_end = array_splice( $values, $insert_at + 1 );
119 119
 
120
-				$keys[] = 'workflow_current_status_timestamp';
121
-				$values[] = array(
120
+				$keys[ ] = 'workflow_current_status_timestamp';
121
+				$values[ ] = array(
122 122
 					'label' => __( 'Workflow Current Status Timestamp', 'gravityview' ),
123 123
 					'type' => 'workflow_current_status_timestamp',
124 124
 				);
Please login to merge, or discard this patch.
fields/class-gravityview-field-workflow_current_status_timestamp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	 * @return string If Gravity Flow not found, or entry not processed yet, returns initial value. Otherwise, returns name of workflow step.
42 42
 	 */
43 43
 	function modify_entry_value_workflow_current_status_timestamp( $output, $entry, $field_settings, $field ) {
44
-		$timestamp = gform_get_meta( $entry['id'], 'workflow_current_status_timestamp' );
44
+		$timestamp = gform_get_meta( $entry[ 'id' ], 'workflow_current_status_timestamp' );
45 45
 
46 46
 		if ( ! $timestamp ) {
47 47
 			return $timestamp;
Please login to merge, or discard this patch.