Completed
Push — develop ( c79605...ad7498 )
by Zack
20:17
created
includes/fields/class-gravityview-field-post-excerpt.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@
 block discarded – undo
24 24
 
25 25
 	public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) {
26 26
 
27
-		unset( $field_options['show_as_link'] );
27
+		unset( $field_options[ 'show_as_link' ] );
28 28
 
29
-		if( 'edit' === $context ) {
29
+		if ( 'edit' === $context ) {
30 30
 			return $field_options;
31 31
 		}
32 32
 
33
-		$this->add_field_support('dynamic_data', $field_options );
33
+		$this->add_field_support( 'dynamic_data', $field_options );
34 34
 
35 35
 		return $field_options;
36 36
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-post-title.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
28 28
 
29 29
 	public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) {
30 30
 
31
-		if( 'edit' === $context ) {
31
+		if ( 'edit' === $context ) {
32 32
 			return $field_options;
33 33
 		}
34 34
 
35
-		$this->add_field_support('link_to_post', $field_options );
35
+		$this->add_field_support( 'link_to_post', $field_options );
36 36
 
37
-		$this->add_field_support('dynamic_data', $field_options );
37
+		$this->add_field_support( 'dynamic_data', $field_options );
38 38
 
39 39
 		return $field_options;
40 40
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-date-created.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
 
36 36
 	public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) {
37 37
 
38
-		if( 'edit' === $context ) {
38
+		if ( 'edit' === $context ) {
39 39
 			return $field_options;
40 40
 		}
41 41
 
42
-		$this->add_field_support('date_display', $field_options );
42
+		$this->add_field_support( 'date_display', $field_options );
43 43
 
44 44
 		return $field_options;
45 45
 	}
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 	public function get_content( $output = '', $entry = array(), $field_settings = array(), $field = array() ) {
62 62
 
63 63
 		/** Overridden by a template. */
64
-		if( ! empty( $field['field_path'] ) ) { return $output; }
64
+		if ( ! empty( $field[ 'field_path' ] ) ) { return $output; }
65 65
 
66
-		return GVCommon::format_date( $field['value'], 'format=' . \GV\Utils::get( $field_settings, 'date_display' ) );
66
+		return GVCommon::format_date( $field[ 'value' ], 'format=' . \GV\Utils::get( $field_settings, 'date_display' ) );
67 67
 	}
68 68
 
69 69
 	/**
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	 *
82 82
 	 * @return string Original text if {date_created} isn't found. Otherwise, replaced text.
83 83
 	 */
84
-	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false  ) {
84
+	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) {
85 85
 
86 86
 		$return = $text;
87 87
 
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 
91 91
 		foreach ( $matches as $match ) {
92 92
 
93
-			$full_tag          = $match[0];
94
-			$property          = $match[1];
93
+			$full_tag          = $match[ 0 ];
94
+			$property          = $match[ 1 ];
95 95
 
96 96
 			$formatted_date = GravityView_Merge_Tags::format_date( $date_created, $property );
97 97
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-section.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@
 block discarded – undo
41 41
 
42 42
 	public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) {
43 43
 
44
-		unset ( $field_options['search_filter'], $field_options['show_as_link'] );
44
+		unset ( $field_options[ 'search_filter' ], $field_options[ 'show_as_link' ] );
45 45
 
46 46
 		// Set the default CSS class to gv-section, which applies a border and top/bottom margin
47
-		$field_options['custom_class']['value'] = 'gv-section';
47
+		$field_options[ 'custom_class' ][ 'value' ] = 'gv-section';
48 48
 
49 49
 		return $field_options;
50 50
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-html.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
 	public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) {
29 29
 
30
-		unset ( $field_options['search_filter'], $field_options['show_as_link'] );
30
+		unset ( $field_options[ 'search_filter' ], $field_options[ 'show_as_link' ] );
31 31
 
32 32
 		return $field_options;
33 33
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-post-id.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
 	public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) {
33 33
 
34
-		$this->add_field_support('link_to_post', $field_options );
34
+		$this->add_field_support( 'link_to_post', $field_options );
35 35
 
36 36
 		return $field_options;
37 37
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-email.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@
 block discarded – undo
28 28
 	public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) {
29 29
 
30 30
 		// It makes no sense to use this as the link.
31
-		unset( $field_options['show_as_link'] );
31
+		unset( $field_options[ 'show_as_link' ] );
32 32
 
33
-		if( 'edit' === $context ) {
33
+		if ( 'edit' === $context ) {
34 34
 			return $field_options;
35 35
 		}
36 36
 
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.
plugin-and-theme-hooks/class-gravityview-plugin-hooks-gravity-pdf.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,16 +47,16 @@
 block discarded – undo
47 47
 
48 48
 		foreach ( $shortcodes->get_shortcode_information( 'gravitypdf', $content ) as $shortcode ) {
49 49
 			// Let's make sure this entry ID is correct for the supplied form
50
-			$form_id = $wpdb->get_var( $wpdb->prepare( "SELECT form_id FROM $table WHERE display_meta LIKE %s", '%"' . $wpdb->esc_like( $shortcode['attr']['id'] ) . '"%' ) );
50
+			$form_id = $wpdb->get_var( $wpdb->prepare( "SELECT form_id FROM $table WHERE display_meta LIKE %s", '%"' . $wpdb->esc_like( $shortcode[ 'attr' ][ 'id' ] ) . '"%' ) );
51 51
 
52 52
 			// Inject the needed entry ID
53 53
 			$replace = str_replace(
54
-				sprintf( 'entry="%d"', $shortcode['attr']['entry'] ),
55
-				sprintf( 'entry="%d"', $context->entry[ $form_id ]['id'] ),
56
-				$shortcode['shortcode']
54
+				sprintf( 'entry="%d"', $shortcode[ 'attr' ][ 'entry' ] ),
55
+				sprintf( 'entry="%d"', $context->entry[ $form_id ][ 'id' ] ),
56
+				$shortcode[ 'shortcode' ]
57 57
 			);
58 58
 
59
-			$content = str_replace( $shortcode['shortcode'], $replace, $content );
59
+			$content = str_replace( $shortcode[ 'shortcode' ], $replace, $content );
60 60
 		}
61 61
 
62 62
 		return $content;
Please login to merge, or discard this patch.