Completed
Pull Request — develop (#1588)
by
unknown
15:48
created
includes/gutenberg/blocks/view/block.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 			$value = esc_attr( sanitize_text_field( $value ) );
56 56
 
57 57
 			if ( in_array( $attribute, $accepted_attributes ) && ! empty( $value ) ) {
58
-				$shortcode_attributes[] = "{$attribute}={$value}";
58
+				$shortcode_attributes[ ] = "{$attribute}={$value}";
59 59
 			}
60 60
 		}
61 61
 
Please login to merge, or discard this patch.
includes/gutenberg/blocks/entry-link/block.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,15 +43,15 @@
 block discarded – undo
43 43
 			$value = esc_attr( sanitize_text_field( $value ) );
44 44
 
45 45
 			if ( 'content' !== $attribute && in_array( $attribute, $accepted_attributes ) && ! empty( $value ) ) {
46
-				$shortcode_attributes[] = "{$attribute}={$value}";
46
+				$shortcode_attributes[ ] = "{$attribute}={$value}";
47 47
 			}
48 48
 		}
49 49
 
50
-		if ( ! empty( $attributes['content'] ) ) {
50
+		if ( ! empty( $attributes[ 'content' ] ) ) {
51 51
 			$shortcode = sprintf(
52 52
 				'[gv_entry_link %s]%s[/gv_entry_link]',
53 53
 				implode( ' ', $shortcode_attributes ),
54
-				wp_kses_post( $attributes['content'] )
54
+				wp_kses_post( $attributes[ 'content' ] )
55 55
 			);
56 56
 		} else {
57 57
 			$shortcode = sprintf( '[gv_entry_link %s/]', implode( ' ', $shortcode_attributes ) );
Please login to merge, or discard this patch.
includes/gutenberg/class-gv-gutenberg-blocks.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
 		global $wp_version;
21 21
 
22 22
 		if ( ! class_exists( 'GravityView_Plugin' ) ||
23
-		     ! function_exists( 'register_block_type' ) ||
24
-		     version_compare( $wp_version, self::MIN_WP_VERSION, '<' )
23
+			 ! function_exists( 'register_block_type' ) ||
24
+			 version_compare( $wp_version, self::MIN_WP_VERSION, '<' )
25 25
 		) {
26 26
 			return;
27 27
 		}
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		wp_enqueue_script(
92 92
 			self::ASSETS_HANDLE,
93 93
 			gravityview()->plugin->url() . $script,
94
-			$asset_file['dependencies'],
94
+			$asset_file[ 'dependencies' ],
95 95
 			filemtime( gravityview()->plugin->dir() . $script )
96 96
 		);
97 97
 
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
 			)
110 110
 		);
111 111
 
112
-		$views_list_array = array_map( function ( $view ) {
112
+		$views_list_array = array_map( function( $view ) {
113 113
 
114
-			$post_title = empty( $view->post_title ) ? __('(no title)', 'gk-gravityview') : $view->post_title;
115
-			$post_title = esc_html( sprintf('%s #%d', $post_title, $view->ID ) );
114
+			$post_title = empty( $view->post_title ) ? __( '(no title)', 'gk-gravityview' ) : $view->post_title;
115
+			$post_title = esc_html( sprintf( '%s #%d', $post_title, $view->ID ) );
116 116
 
117 117
 			return array(
118 118
 				'value' => $view->ID,
Please login to merge, or discard this patch.
includes/gutenberg/blocks/field/block.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 			$value = esc_attr( sanitize_text_field( $value ) );
56 56
 
57 57
 			if ( in_array( $attribute, $accepted_attributes ) && ! empty( $value ) ) {
58
-				$shortcode_attributes[] = "{$attribute}={$value}";
58
+				$shortcode_attributes[ ] = "{$attribute}={$value}";
59 59
 			}
60 60
 		}
61 61
 
Please login to merge, or discard this patch.
includes/gutenberg/blocks/entry/block.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 			$value = esc_attr( sanitize_text_field( $value ) );
56 56
 
57 57
 			if ( in_array( $attribute, $accepted_attributes ) && ! empty( $value ) ) {
58
-				$shortcode_attributes[] = "{$attribute}={$value}";
58
+				$shortcode_attributes[ ] = "{$attribute}={$value}";
59 59
 			}
60 60
 		}
61 61
 
Please login to merge, or discard this patch.
includes/gutenberg/blocks/view-details/block.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 			$value = esc_attr( sanitize_text_field( $value ) );
56 56
 
57 57
 			if ( in_array( $attribute, $accepted_attributes ) && ! empty( $value ) ) {
58
-				$shortcode_attributes[] = "{$attribute}={$value}";
58
+				$shortcode_attributes[ ] = "{$attribute}={$value}";
59 59
 			}
60 60
 		}
61 61
 
Please login to merge, or discard this patch.
future/includes/gutenberg/blocks/entry-link/block.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 *
37 37
 	 * @return string $output
38 38
 	 */
39
-	static function render( $block_attributes = [] ) {
39
+	static function render( $block_attributes = [ ] ) {
40 40
 		$block_to_shortcode_attributes_map = [
41 41
 			'viewId'       => 'view_id',
42 42
 			'entryId'      => 'entry_id',
@@ -48,21 +48,21 @@  discard block
 block discarded – undo
48 48
 			'content'      => 'content',
49 49
 		];
50 50
 
51
-		$shortcode_attributes = [];
51
+		$shortcode_attributes = [ ];
52 52
 
53 53
 		foreach ( $block_attributes as $attribute => $value ) {
54 54
 			$value = esc_attr( sanitize_text_field( $value ) );
55 55
 
56 56
 			if ( isset( $block_to_shortcode_attributes_map[ $attribute ] ) && ! empty( $value ) ) {
57
-				$shortcode_attributes[] = sprintf( '%s="%s"', $block_to_shortcode_attributes_map[ $attribute ], $value );
57
+				$shortcode_attributes[ ] = sprintf( '%s="%s"', $block_to_shortcode_attributes_map[ $attribute ], $value );
58 58
 			}
59 59
 		}
60 60
 
61
-		if ( ! empty( $block_attributes['content'] ) ) {
61
+		if ( ! empty( $block_attributes[ 'content' ] ) ) {
62 62
 			$shortcode = sprintf(
63 63
 				'[gv_entry_link %s]%s[/gv_entry_link]',
64 64
 				implode( ' ', $shortcode_attributes ),
65
-				wp_kses_post( $block_attributes['content'] )
65
+				wp_kses_post( $block_attributes[ 'content' ] )
66 66
 			);
67 67
 		} else {
68 68
 			$shortcode = sprintf( '[gv_entry_link %s/]', implode( ' ', $shortcode_attributes ) );
@@ -78,6 +78,6 @@  discard block
 block discarded – undo
78 78
 
79 79
 		$rendered_shortcode = Blocks::render_shortcode( $shortcode );
80 80
 
81
-		return $rendered_shortcode['content'];
81
+		return $rendered_shortcode[ 'content' ];
82 82
 	}
83 83
 }
Please login to merge, or discard this patch.
future/includes/gutenberg/blocks/view-details/block.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,19 +36,19 @@  discard block
 block discarded – undo
36 36
 	 *
37 37
 	 * @return string $output
38 38
 	 */
39
-	static function render( $block_attributes = [] ) {
39
+	static function render( $block_attributes = [ ] ) {
40 40
 		$block_to_shortcode_attributes_map = [
41 41
 			'viewId' => 'id',
42 42
 			'detail' => 'detail',
43 43
 		];
44 44
 
45
-		$shortcode_attributes = [];
45
+		$shortcode_attributes = [ ];
46 46
 
47 47
 		foreach ( $block_attributes as $attribute => $value ) {
48 48
 			$value = esc_attr( sanitize_text_field( $value ) );
49 49
 
50 50
 			if ( isset( $block_to_shortcode_attributes_map[ $attribute ] ) && ! empty( $value ) ) {
51
-				$shortcode_attributes[] = sprintf( '%s="%s"', $block_to_shortcode_attributes_map[ $attribute ], $value );
51
+				$shortcode_attributes[ ] = sprintf( '%s="%s"', $block_to_shortcode_attributes_map[ $attribute ], $value );
52 52
 			}
53 53
 		}
54 54
 
@@ -60,6 +60,6 @@  discard block
 block discarded – undo
60 60
 
61 61
 		$rendered_shortcode = Blocks::render_shortcode( $shortcode );
62 62
 
63
-		return $rendered_shortcode['content'];
63
+		return $rendered_shortcode[ 'content' ];
64 64
 	}
65 65
 }
Please login to merge, or discard this patch.
future/includes/gutenberg/blocks/entry/block.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,19 +36,19 @@  discard block
 block discarded – undo
36 36
 	 *
37 37
 	 * @return string $output
38 38
 	 */
39
-	static function render( $block_attributes = [] ) {
39
+	static function render( $block_attributes = [ ] ) {
40 40
 		$block_to_shortcode_attributes_map = [
41 41
 			'entryId' => 'id',
42 42
 			'viewId'  => 'view_id',
43 43
 		];
44 44
 
45
-		$shortcode_attributes = [];
45
+		$shortcode_attributes = [ ];
46 46
 
47 47
 		foreach ( $block_attributes as $attribute => $value ) {
48 48
 			$value = esc_attr( sanitize_text_field( $value ) );
49 49
 
50 50
 			if ( isset( $block_to_shortcode_attributes_map[ $attribute ] ) && ! empty( $value ) ) {
51
-				$shortcode_attributes[] = sprintf( '%s="%s"', $block_to_shortcode_attributes_map[ $attribute ], $value );
51
+				$shortcode_attributes[ ] = sprintf( '%s="%s"', $block_to_shortcode_attributes_map[ $attribute ], $value );
52 52
 			}
53 53
 		}
54 54
 
@@ -60,6 +60,6 @@  discard block
 block discarded – undo
60 60
 
61 61
 		$rendered_shortcode = Blocks::render_shortcode( $shortcode );
62 62
 
63
-		return $rendered_shortcode['content'];
63
+		return $rendered_shortcode[ 'content' ];
64 64
 	}
65 65
 }
Please login to merge, or discard this patch.