PluginProbe
Genesis Blocks / 3.1.5
Genesis Blocks v3.1.5
3.1.11 trunk 1.0.0 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 3.0.0 3.0.1 3.1.0 3.1.1 3.1.10 All 32 releases
genesis-blocks / genesis-blocks.php

genesis-blocks.php in Genesis Blocks 3.1.5, at genesis-blocks.php

53 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Genesis Blocks
4 * Plugin URI: https://studiopress.com/genesis-pro/
5 * Description: A beautiful collection of handy blocks to help you get started with the new WordPress editor.
6 * Author: StudioPress
7 * Author URI: https://www.studiopress.com/
8 * Version: 3.1.5
9 * License: GPL2+
10 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
11 *
12 * @package Genesis\Blocks
13 */
14
15 // Include Composer Autoloader.
16 require __DIR__ . '/vendor/autoload.php';
17
18 /**
19 * Instantiate Genesis Blocks Plugin.
20 *
21 * @since 1.0.0
22 */
23 function genesis_blocks_load(): void {
24 $context = [
25 'url' => plugin_dir_url( __FILE__ ),
26 'path' => plugin_dir_path( __FILE__ ),
27 'version' => get_file_data( __FILE__, [ 'Version' ] )[0],
28 'theme' => sanitize_title( get_stylesheet() ),
29 ];
30
31 ( new Genesis\Blocks\PluginLoader( $context ) )->init();
32 }
33 add_action( 'plugins_loaded', 'genesis_blocks_load' );
34
35 function genesis_blocks_main_plugin_file(): string {
36 return __FILE__;
37 }
38
39 /**
40 * Load the plugin textdomain
41 */
42 function genesis_blocks_text_domain() {
43 load_plugin_textdomain( 'genesis-blocks', false, basename( __DIR__ ) . '/languages' );
44 }
45 add_action( 'init', 'genesis_blocks_text_domain' );
46
47 /**
48 * Check for Pro version.
49 */
50 function genesis_blocks_is_pro() {
51 return function_exists( 'AtomicBlocksPro\atomic_blocks_pro_main_plugin_file' ) || function_exists( 'Genesis\PageBuilder\main_plugin_file' );
52 }
53