PluginProbe ʕ •ᴥ•ʔ
FAPI Member / trunk
FAPI Member vtrunk
2.2.33 2.2.32 trunk 1.9.47 2.1.18 2.2.24 2.2.25 2.2.26 2.2.28 2.2.29 2.2.30 2.2.31
fapi-member / multiple-blocks / multiple-blocks.php
fapi-member / multiple-blocks Last commit date
build 7 months ago includes 7 months ago multiple-blocks.php 3 years ago package.json 3 years ago webpack.config.js 3 years ago
multiple-blocks.php
44 lines
1 <?php
2 /**
3 * Plugin Name: FAPI Member
4 * Description: FAPI Member block and extensions.
5 * Requires at least: 5.8
6 * Requires PHP: 5.6
7 * Version: 0.1.2
8 * Author: FAPI Business s.r.o.
9 * License: GPL-2.0-or-later
10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11 * Text Domain: fapi-member
12 *
13 * @package fapi-member
14 */
15
16 function create_block_fapi_member_block_init() {
17
18 $blocks = array(
19 'block-extender/',
20 'fapi-form-block/',
21 );
22
23 foreach( $blocks as $block ) {
24 register_block_type( __DIR__ . '/includes/block-editor/blocks/' . $block );
25 }
26 }
27 add_action( 'init', 'create_block_fapi_member_block_init' );
28
29 function register_fapi_category( $categories ) {
30
31 $categories[] = array(
32 'slug' => 'fapi',
33 'title' => __('FAPI', 'fapi-member')
34 );
35
36 return $categories;
37 }
38
39 if ( version_compare( get_bloginfo( 'version' ), '5.8', '>=' ) ) {
40 add_filter( 'block_categories_all', 'register_fapi_category' );
41 } else {
42 add_filter( 'block_categories', 'register_fapi_category' );
43 }
44