Completed
Pull Request — develop (#1588)
by
unknown
16:07
created
future/includes/gutenberg/blocks/view/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'         => 'id',
42 42
 			'postId'         => 'post_id',
@@ -54,17 +54,17 @@  discard block
 block discarded – undo
54 54
 			'backLinkLabel'  => 'back_link_label',
55 55
 		];
56 56
 
57
-		if ( isset( $block_attributes['searchOperator'] ) && empty( $block_attributes['searchValue'] ) ) {
58
-			unset( $block_attributes['searchOperator'] );
57
+		if ( isset( $block_attributes[ 'searchOperator' ] ) && empty( $block_attributes[ 'searchValue' ] ) ) {
58
+			unset( $block_attributes[ 'searchOperator' ] );
59 59
 		}
60 60
 
61
-		$shortcode_attributes = [];
61
+		$shortcode_attributes = [ ];
62 62
 
63 63
 		foreach ( $block_attributes as $attribute => $value ) {
64 64
 			$value = esc_attr( sanitize_text_field( $value ) );
65 65
 
66 66
 			if ( isset( $block_to_shortcode_attributes_map[ $attribute ] ) && ! empty( $value ) ) {
67
-				$shortcode_attributes[] = "{$block_to_shortcode_attributes_map[$attribute]}={$value}";
67
+				$shortcode_attributes[ ] = "{$block_to_shortcode_attributes_map[ $attribute ]}={$value}";
68 68
 			}
69 69
 		}
70 70
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 		$rendered_shortcode = Blocks::render_shortcode( $shortcode );
78 78
 
79 79
 		if ( ! defined( 'REST_REQUEST' ) || ! REST_REQUEST ) {
80
-			return $rendered_shortcode['content'];
80
+			return $rendered_shortcode[ 'content' ];
81 81
 		}
82 82
 
83 83
 		return json_encode( $rendered_shortcode );
Please login to merge, or discard this patch.
future/includes/gutenberg/build/view.asset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,1 +1,1 @@
 block discarded – undo
1
-<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'b01b31f57233994b6e45');
1
+<?php return array( 'dependencies' => array( 'lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-url' ), 'version' => 'b01b31f57233994b6e45' );
Please login to merge, or discard this patch.