PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 1.0
bBlocks – Essential Gutenberg Blocks & Patterns Collection v1.0
2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 All 105 releases
b-blocks / plugin.php

plugin.php in bBlocks – Essential Gutenberg Blocks & Patterns Collection 1.0, at plugin.php

40 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: B Blocks
4 * Plugin URI: http://bblockswp.com/
5 * Description: Gutenberg Blocks Collection and Page Builder.
6 * Version: 1.0
7 * Author: bPlugins LLC
8 * Author URI: http://bplugins.com
9 * License: GPLv3
10 * License URI: https://www.gnu.org/licenses/gpl-2.0.txt
11 * Text Domain: b-blocks
12 */
13
14 // Block Initializer.
15 require_once plugin_dir_path( __FILE__ ) . 'src/init.php';
16
17 // Constant
18 define( 'B_BLOCKS_PLUGIN_VERSION', '1.0.0' );
19 define( "B_BLOCKS_ASSETS_DIR", plugin_dir_url( __FILE__ ) . 'assets/' );
20
21 // Public Assets
22 function b_blocks_assets() {
23 wp_enqueue_style( 'bootstrap', B_BLOCKS_ASSETS_DIR . 'css/bootstrap.min.css', '', '4.6.0', 'all' );
24
25 wp_enqueue_script( 'bootstrap', B_BLOCKS_ASSETS_DIR . 'js/bootstrap.bundle.min.js', array( 'jquery' ), '4.6.0', true );
26 wp_enqueue_script( 'mailtoui', B_BLOCKS_ASSETS_DIR . 'js/mailtoui-min.js', array(), B_BLOCKS_PLUGIN_VERSION, true );
27 wp_enqueue_script( 'b-blocks-script', B_BLOCKS_ASSETS_DIR . 'js/script.js', array( 'jquery', 'wp-tinymce' ), B_BLOCKS_PLUGIN_VERSION, true );
28 }
29 add_action( 'wp_enqueue_scripts', 'b_blocks_assets' );
30
31 // Admin Assets
32 function b_blocks_admin_assets( $screen ) {
33 if ( 'post-new.php' == $screen || 'post.php' == $screen ) {
34 wp_enqueue_style( 'bootstrap', B_BLOCKS_ASSETS_DIR . 'css/bootstrap.min.css', '', '4.6.0', 'all' );
35
36 wp_enqueue_script( 'bootstrap', B_BLOCKS_ASSETS_DIR . 'js/bootstrap.bundle.min.js', array( 'jquery' ), '4.6.0', true );
37 wp_enqueue_script( 'mailtoui', B_BLOCKS_ASSETS_DIR . 'js/mailtoui-min.js', array(), B_BLOCKS_PLUGIN_VERSION, true );
38 }
39 }
40 add_action( 'admin_enqueue_scripts', 'b_blocks_admin_assets' );