-
Notifications
You must be signed in to change notification settings - Fork 4
/
cloud-blocks.php
56 lines (48 loc) · 1.46 KB
/
cloud-blocks.php
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/*
Plugin Name: Cloud Blocks
Version: 1.1.7
Description: Your library of Gutenberg blocks in the cloud
Author: Frontkom
Author URI: https://frontkom.no
License: GPL2
*/
if ( ! defined( 'ABSPATH' ) ) {
die;
}
// Plugin path.
if ( ! defined( 'FGC_PATH' ) ) {
define( 'FGC_PATH', plugin_dir_path( __FILE__ ) );
}
// Plugin URL.
if ( ! defined( 'FGC_URL' ) ) {
define( 'FGC_URL', plugin_dir_url( __FILE__ ) );
}
// Plugin base.
if ( ! defined( 'FGC_BASE' ) ) {
define( 'FGC_BASE', plugin_basename( __FILE__ ) );
}
// Plugin name.
if ( ! defined( 'FGC_NAME' ) ) {
define( 'FGC_NAME', 'cloud-blocks' );
}
// Plugin version .
if ( ! defined( 'FGC_VERSION' ) ) {
define( 'FGC_VERSION', '1.1.7' );
}
// Require autoload
require_once __DIR__ . '/vendor/autoload.php';
// Register text-domain for translations
add_action( 'plugins_loaded', 'fgc_register_translations' );
function fgc_register_translations() {
load_plugin_textdomain( 'cloud-blocks', false, basename( dirname( __FILE__ ) ) . '/languages' );
}
// Register activation hook
register_activation_hook( __FILE__, array( 'CloudBlocks\Activator', 'init' ) );
// Register CRON hooks
register_activation_hook( __FILE__, array( 'CloudBlocks\Blocks\Explore', 'cron_schedule' ) );
register_deactivation_hook( __FILE__, array( 'CloudBlocks\Blocks\Explore', 'cron_unschedule' ) );
// Register uninstall hook
register_uninstall_hook( __FILE__, array( 'CloudBlocks\Uninstall', 'init' ) );
// Initiate plugin
new CloudBlocks\CloudBlocks;