PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.1.0
GiveWP – Donation Plugin and Fundraising Platform v4.1.0
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / blocks / load.php

load.php in GiveWP – Donation Plugin and Fundraising Platform 4.1.0, at blocks/load.php

38 lines 904 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if access directly.
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 /**
8 * Add Custom Block Category for Give blocks
9 */
10 function give_blocks_category( $categories, $post ) {
11 return array_merge(
12 $categories,
13 array(
14 array(
15 'slug' => 'give',
16 'title' => __( 'Give', 'give' ),
17 ),
18 )
19 );
20 }
21
22 /**
23 * @since 2.19.0 The `block_categories` filter is deprecated as of WordPress 5.8
24 */
25 if ( version_compare( get_bloginfo( 'version' ), '5.8', '>=' ) ) {
26 add_filter( 'block_categories_all', 'give_blocks_category', 10, 2 );
27 } else {
28 add_filter( 'block_categories', 'give_blocks_category', 10, 2 );
29 }
30
31 /**
32 * Blocks
33 */
34 require_once GIVE_PLUGIN_DIR . 'blocks/donation-form/class-give-donation-form-block.php';
35 require_once GIVE_PLUGIN_DIR . 'blocks/donation-form-grid/class-give-donation-form-grid-block.php';
36 require_once GIVE_PLUGIN_DIR . 'blocks/donor-wall/class-give-donor-wall.php';
37
38