PluginProbe
GutSlider – All in One Slider and Carousel Blocks for Gutenberg / 3.2.0
GutSlider – All in One Slider and Carousel Blocks for Gutenberg v3.2.0
3.2.0 3.1.0 3.0.0 2.13.2 2.13.1 2.13.0 trunk 1.0.0 2.1.0 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.12.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.1 2.5.3 2.5.4 2.5.5 All 57 releases
← All changes | includes/Blocks/BlocksCategory.php +15 -5 2.11.2 → 3.2.0 View file →
@@ -40,13 +40,23 @@
40 40 * @param array<int, array<string, mixed>> $categories Existing block categories.
41 41 * @param \WP_Block_Editor_Context $context The block editor context.
42 42 * @return array<int, array<string, mixed>> Modified block categories.
43 43 */
44 - public function register_block_category( array $categories, \WP_Block_Editor_Context $context ): array {
45 - $new_category = array(
46 - 'slug' => 'slider-blocks',
44 + // public function register_block_category( array $categories, \WP_Block_Editor_Context $context ): array {
45 + // $new_category = array(
46 + // 'slug' => 'slider-blocks',
47 + // 'title' => __( 'GutSlider Blocks', 'slider-blocks' ),
48 + // );
49 +
50 + // return array_merge( array( $new_category ), $categories );
51 + // }
52 +
53 + public function register_block_category( $categories, $post ) {
54 +
55 + array_unshift( $categories, array(
56 + 'slug' => 'slider-blocks',
47 57 'title' => __( 'GutSlider Blocks', 'slider-blocks' ),
48 - );
58 + ) );
49 59
50 - return array_merge( array( $new_category ), $categories );
60 + return $categories;
51 61 }
52 62 }