-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblock-injector.php
More file actions
71 lines (63 loc) · 2.11 KB
/
block-injector.php
File metadata and controls
71 lines (63 loc) · 2.11 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* Plugin Name: Block Injector
* Description: A WordPress plugin that lets you inject content into Post and Page content.
* Version: 1.1.2
* Plugin URI: https://pootlepress.com/block-injector/
* Author: PootlePress
* Author URI: https://pootlepress.com/
* Text Domain: block-injector
*
* @package Block Injector
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
require_once 'inc/helper.php';
require_once 'inc/class-content-filter.php';
require_once 'inc/class-content.php';
require_once 'inc/class-content-shortcodes.php';
require_once 'inc/class-plugin.php';
require_once 'inc/class-admin.php';
$router = new PMAB_Admin( PMAB_Plugin::instance( __FILE__ ), new PMAB_Content() );
add_action( 'plugins_loaded', array( $router, 'init' ) );
if ( ! function_exists( 'block_injector_fs' ) ) {
// Create a helper function for easy SDK access.
function block_injector_fs() {
global $block_injector_fs;
if ( ! isset( $block_injector_fs ) ) {
// Include Freemius SDK.
require_once dirname(__FILE__) . '/wp-sdk/start.php';
$block_injector_fs = fs_dynamic_init( array(
'id' => '9001',
'slug' => 'block-injector',
'type' => 'plugin',
'public_key' => 'pk_dc610c4658e1657b7bd55e7b9ffff',
'is_premium' => true,
'is_premium_only' => true,
'has_addons' => false,
'has_paid_plans' => true,
'is_org_compliant' => false,
'trial' => array(
'days' => 14,
'is_require_payment' => true,
),
'menu' => array(
'slug' => 'block-injector-intro',
'support' => false,
'parent' => array(
'slug' => 'edit.php?post_type=block_injector',
),
),
// Set the SDK to work in a sandbox mode (for development & testing).
// IMPORTANT: MAKE SURE TO REMOVE SECRET KEY BEFORE DEPLOYMENT.
'secret_key' => 'sk_1f9RvZfA8Jl&0$:2$grzt}FxhOIxQ',
) );
}
return $block_injector_fs;
}
// Init Freemius.
block_injector_fs();
// Signal that SDK was initiated.
do_action( 'block_injector_fs_loaded' );
}