PluginProbe ʕ •ᴥ•ʔ
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More / 2.0.2
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More v2.0.2
4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 trunk 1.0.0 2.0.0 2.0.1 2.0.2 2.0.3 3.0 3.0.1 3.0.2 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.2.0 3.2.1 3.2.2 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.4.5 3.4.6 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.6 3.5.7 3.5.8 3.5.9 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1
superb-blocks / init.php
superb-blocks Last commit date
blocks 4 years ago build 4 years ago inc 4 years ago lib 4 years ago init.php 4 years ago plugin.php 4 years ago readme.txt 4 years ago
init.php
57 lines
1 <?php
2
3 // Exit if accessed directly.
4 if (! defined('ABSPATH')) {
5 exit;
6 }
7
8 if (! defined('SUPERBBLOCKS_VERSION')) {
9 exit;
10 }
11
12 /**
13 * Registers the block using the metadata loaded from the `block.json` file.
14 * Behind the scenes, it registers also all assets so they can be enqueued
15 * through the block editor in the corresponding context.
16 *
17 * @see https://developer.wordpress.org/reference/functions/register_block_type/
18 */
19 function create_block_superb_blocks_block_init()
20 {
21 wp_register_style(
22 'superb-blocks-fontawesome-css', // Handle.
23 plugins_url('superb-blocks/lib/fontawesome/css/all.min.css', plugin_dir_path(__FILE__)), // Block style CSS.
24 is_admin() ? array( 'wp-editor' ) : null, // Dependency to include the CSS after it.
25 SUPERBBLOCKS_VERSION // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css' ) // Version: File modification time.
26 );
27 wp_enqueue_style('superb-blocks-fontawesome-css');
28 $blocks = array(
29 'superb-author-block',
30 'superb-rating-block',
31 'superb-table-of-content-block'
32 );
33 foreach ($blocks as $block) {
34 register_block_type(plugin_dir_path(__FILE__).'blocks/'.$block.'/');
35 }
36 }
37 add_action('init', 'create_block_superb_blocks_block_init');
38
39
40 add_action('admin_init', 'superb_blocks_spbThemesNotification', 9);
41 function superb_blocks_spbThemesNotification()
42 {
43 $notifications = include(plugin_dir_path(__FILE__).'inc/admin_notification/Autoload.php');
44 $options = array("delay"=> "+3 days");
45 $notifications->Add("superb_blocks_admin_notification", "Unlock All Features with Superb Blocks Premium", "
46
47 Take advantage of the up to <span style='font-weight:bold;'>45% discount</span> and unlock all features for Superb Blocks Premium.
48 The discount is only available for a limited time.
49
50 <div>
51 <a style='margin-bottom:15px;' class='button button-large button-secondary' target='_blank' href='https://superbthemes.com/plugins/superb-blocks/'>Read more</a> <a style='margin-bottom:15px;' class='button button-large button-primary' target='_blank' href='https://superbthemes.com/plugins/superb-blocks/'>Buy now</a>
52 </div>
53
54 ", "info", $options);
55 $notifications->Boot();
56 }
57