PluginProbe
Gutenberg / 22.7.0
Gutenberg v22.7.0
24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 All 403 releases
← All changes | build/scripts/block-library/query.php +5 -6 24.0.022.7.0 View file →
@@ -18,10 +18,9 @@
18 18 */
19 19 function gutenberg_render_block_core_query( $attributes, $content, $block ) {
20 20 $is_interactive = isset( $attributes['enhancedPagination'] )
21 21 && true === $attributes['enhancedPagination']
22 - && isset( $attributes['queryId'] )
23 - && is_scalar( $attributes['queryId'] );
22 + && isset( $attributes['queryId'] );
24 23
25 24 // Enqueue the script module and add the necessary directives if the block is
26 25 // interactive.
27 26 if ( $is_interactive ) {
@@ -88,9 +87,9 @@
88 87 static $render_query_callback = null;
89 88
90 89 $block_name = $parsed_block['blockName'];
91 90 $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block_name );
92 - $has_enhanced_pagination = isset( $parsed_block['attrs']['enhancedPagination'] ) && true === $parsed_block['attrs']['enhancedPagination'] && isset( $parsed_block['attrs']['queryId'] ) && is_scalar( $parsed_block['attrs']['queryId'] );
91 + $has_enhanced_pagination = isset( $parsed_block['attrs']['enhancedPagination'] ) && true === $parsed_block['attrs']['enhancedPagination'] && isset( $parsed_block['attrs']['queryId'] );
93 92 /*
94 93 * Client side navigation can be true in two states:
95 94 * - supports.interactivity = true;
96 95 * - supports.interactivity.clientNavigation = true;
@@ -107,14 +106,14 @@
107 106 * rendering when a plugin block has been found inside. It does so
108 107 * by adding an attribute called `data-wp-navigation-disabled` which
109 108 * is later handled by the front-end logic.
110 109 *
111 - * @param string $content The block content.
112 - * @param array $block The full block, including name and attributes.
110 + * @param string $content The block content.
111 + * @param array $block The full block, including name and attributes.
113 112 * @return string Returns the modified output of the query block.
114 113 */
115 114 $render_query_callback = static function ( $content, $block ) use ( &$enhanced_query_stack, &$dirty_enhanced_queries, &$render_query_callback ) {
116 - $has_enhanced_pagination = isset( $block['attrs']['enhancedPagination'] ) && true === $block['attrs']['enhancedPagination'] && isset( $block['attrs']['queryId'] ) && is_scalar( $block['attrs']['queryId'] );
115 + $has_enhanced_pagination = isset( $block['attrs']['enhancedPagination'] ) && true === $block['attrs']['enhancedPagination'] && isset( $block['attrs']['queryId'] );
117 116
118 117 if ( ! $has_enhanced_pagination ) {
119 118 return $content;
120 119 }