PluginProbe
Gutenberg / 14.5.2
Gutenberg v14.5.2
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/block-library/blocks/categories.php +3 -2 12.6.0 → 14.5.2 View file →
@@ -13,9 +13,9 @@
13 13 * @return string Returns the categories list/dropdown markup.
14 14 */
15 15 function gutenberg_render_block_core_categories( $attributes ) {
16 16 static $block_id = 0;
17 - $block_id++;
17 + ++$block_id;
18 18
19 19 $args = array(
20 20 'echo' => false,
21 21 'hierarchical' => ! empty( $attributes['showHierarchy'] ),
@@ -21,8 +21,9 @@
21 21 'hierarchical' => ! empty( $attributes['showHierarchy'] ),
22 22 'orderby' => 'name',
23 23 'show_count' => ! empty( $attributes['showPostCounts'] ),
24 24 'title_li' => '',
25 + 'hide_empty' => empty( $attributes['showEmpty'] ),
25 26 );
26 27 if ( ! empty( $attributes['showOnlyTopLevel'] ) && $attributes['showOnlyTopLevel'] ) {
27 28 $args['parent'] = 0;
28 29 }
@@ -74,9 +75,9 @@
74 75 ( function() {
75 76 var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
76 77 function gutenberg_onCatChange() {
77 78 if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {
78 - location.href = "<?php echo home_url(); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value;
79 + location.href = "<?php echo esc_url( home_url() ); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value;
79 80 }
80 81 }
81 82 dropdown.onchange = gutenberg_onCatChange;
82 83 })();