@@ -33,19 +33,19 @@ |
||
33 | 33 | * |
34 | 34 | * @return string $output |
35 | 35 | */ |
36 | - static function render( $block_attributes = [] ) { |
|
36 | + static function render( $block_attributes = [ ] ) { |
|
37 | 37 | $block_to_shortcode_attributes_map = [ |
38 | 38 | 'entryId' => 'id', |
39 | 39 | 'viewId' => 'view_id', |
40 | 40 | ]; |
41 | 41 | |
42 | - $shortcode_attributes = []; |
|
42 | + $shortcode_attributes = [ ]; |
|
43 | 43 | |
44 | 44 | foreach ( $block_attributes as $attribute => $value ) { |
45 | 45 | $value = esc_attr( sanitize_text_field( $value ) ); |
46 | 46 | |
47 | 47 | if ( isset( $block_to_shortcode_attributes_map[ $attribute ] ) && ! empty( $value ) ) { |
48 | - $shortcode_attributes[] = sprintf( '%s="%s"', $block_to_shortcode_attributes_map[ $attribute ], $value ); |
|
48 | + $shortcode_attributes[ ] = sprintf( '%s="%s"', $block_to_shortcode_attributes_map[ $attribute ], $value ); |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * |
34 | 34 | * @return string $output |
35 | 35 | */ |
36 | - static function render( $block_attributes = [] ) { |
|
36 | + static function render( $block_attributes = [ ] ) { |
|
37 | 37 | $block_to_shortcode_attributes_map = [ |
38 | 38 | 'viewId' => 'view_id', |
39 | 39 | 'entryId' => 'entry_id', |
@@ -45,21 +45,21 @@ discard block |
||
45 | 45 | 'content' => 'content', |
46 | 46 | ]; |
47 | 47 | |
48 | - $shortcode_attributes = []; |
|
48 | + $shortcode_attributes = [ ]; |
|
49 | 49 | |
50 | 50 | foreach ( $block_attributes as $attribute => $value ) { |
51 | 51 | $value = esc_attr( sanitize_text_field( $value ) ); |
52 | 52 | |
53 | 53 | if ( isset( $block_to_shortcode_attributes_map[ $attribute ] ) && ! empty( $value ) ) { |
54 | - $shortcode_attributes[] = sprintf( '%s="%s"', $block_to_shortcode_attributes_map[ $attribute ], $value ); |
|
54 | + $shortcode_attributes[ ] = sprintf( '%s="%s"', $block_to_shortcode_attributes_map[ $attribute ], $value ); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | - if ( ! empty( $block_attributes['content'] ) ) { |
|
58 | + if ( ! empty( $block_attributes[ 'content' ] ) ) { |
|
59 | 59 | $shortcode = sprintf( |
60 | 60 | '[gv_entry_link %s]%s[/gv_entry_link]', |
61 | 61 | implode( ' ', $shortcode_attributes ), |
62 | - wp_kses_post( $block_attributes['content'] ) |
|
62 | + wp_kses_post( $block_attributes[ 'content' ] ) |
|
63 | 63 | ); |
64 | 64 | } else { |
65 | 65 | $shortcode = sprintf( '[gv_entry_link %s/]', implode( ' ', $shortcode_attributes ) ); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $block_class = array_values( array_diff( get_declared_classes(), $declared_classes ) ); |
51 | 51 | |
52 | 52 | if ( ! empty( $block_class ) ) { |
53 | - $block_class = new $block_class[0](); |
|
53 | + $block_class = new $block_class[ 0 ](); |
|
54 | 54 | |
55 | 55 | if ( is_callable( [ $block_class, 'modify_block_meta' ] ) ) { |
56 | 56 | $block_meta = array_merge( $block_meta, $block_class->modify_block_meta( $block_meta ) ); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $localization_data = Arr::get( $block_meta, 'localization' ); |
62 | 62 | |
63 | 63 | if ( $localization_data ) { |
64 | - add_filter( 'gk/gravityview/gutenberg/blocks/localization', function ( $localization ) use ( $block_name, $localization_data ) { |
|
64 | + add_filter( 'gk/gravityview/gutenberg/blocks/localization', function( $localization ) use ( $block_name, $localization_data ) { |
|
65 | 65 | $localization[ $block_name ] = $localization_data; |
66 | 66 | |
67 | 67 | return $localization; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | 'views' => $this->get_views() |
113 | 113 | ] ); |
114 | 114 | |
115 | - wp_register_script( self::SLUG, false, [] ); |
|
115 | + wp_register_script( self::SLUG, false, [ ] ); |
|
116 | 116 | |
117 | 117 | wp_enqueue_script( self::SLUG ); |
118 | 118 | |
@@ -136,9 +136,9 @@ discard block |
||
136 | 136 | 'order' => 'ASC', |
137 | 137 | ] ); |
138 | 138 | |
139 | - return array_map( function ( $view ) { |
|
139 | + return array_map( function( $view ) { |
|
140 | 140 | return [ |
141 | - 'value' => (string) $view->ID, |
|
141 | + 'value' => (string)$view->ID, |
|
142 | 142 | 'label' => $view->post_title, |
143 | 143 | ]; |
144 | 144 | }, $views ); |
@@ -1,1 +1,1 @@ |
||
1 | -<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '2786fd6919279e341a92'); |
|
1 | +<?php return array( 'dependencies' => array( 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render' ), 'version' => '2786fd6919279e341a92' ); |
@@ -1,1 +1,1 @@ |
||
1 | -<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '7db90d26e07887a38c92'); |
|
1 | +<?php return array( 'dependencies' => array( 'react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render' ), 'version' => '7db90d26e07887a38c92' ); |
@@ -1,1 +1,1 @@ |
||
1 | -<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '8611ea9f2d8eda18986a'); |
|
1 | +<?php return array( 'dependencies' => array( 'react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render' ), 'version' => '8611ea9f2d8eda18986a' ); |
@@ -1,1 +1,1 @@ |
||
1 | -<?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => 'cdd72d8c313439170083'); |
|
1 | +<?php return array( 'dependencies' => array( 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render' ), 'version' => 'cdd72d8c313439170083' ); |
@@ -1,1 +1,1 @@ |
||
1 | -<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '3d62d496ce4359b9dc0b'); |
|
1 | +<?php return array( 'dependencies' => array( 'react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render' ), 'version' => '3d62d496ce4359b9dc0b' ); |