-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.php
More file actions
38 lines (32 loc) · 842 Bytes
/
plugin.php
File metadata and controls
38 lines (32 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* Plugin Name: Papi Blocks — Gutenberg Blocks
* Plugin URI: https://github.com/wp-papi/papi-blocks/
* Description: Papi blocks for Gutenberg.
* Author: Fredrik Forsmo
* Author URI: https://frozzare.com
* Version: 1.0.0-dev
* Plugin URI: https://wp-papi.github.io
* Textdomain: papi-blocks
* Domain Path: /languages/
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php';
}
/**
* Boostrap plugin.
*/
add_action( 'plugins_loaded', function () {
if ( ! function_exists( 'register_block_type' ) ) {
return;
}
if ( ! function_exists( 'papi' ) ) {
return;
}
require_once plugin_dir_path( __FILE__ ) . 'src/class-papi-blocks-loader.php';
return Papi_Blocks_Loader::instance();
} );