-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
35 lines (29 loc) · 922 Bytes
/
index.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
<?php
/*
Plugin Name: KWD React Plugin One
Plugin URI: https://github.com/Kernix13
Description: Multiple choice quiz
Version: 1.0.0
Author: James Kernicky
Author URI: https://kernixwebdesign.com/
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: some-name-here
*/
if( ! defined('ABSPATH') ) exit; // Exit if accessed directly
class KWDReactPluginOne {
function __construct() {
add_action( 'init', array($this, 'adminAssets') );
}
function adminAssets() {
register_block_type(__DIR__, array(
'render_callback' => array($this, 'theHTML')
));
}
function theHTML($attributes) {
ob_start(); ?>
<div class="paying-attention-update-me"><pre style="display: none;"><?php echo wp_json_encode($attributes) ?></pre></div>
<?php return ob_get_clean();
}
}
$kwdReactPluginOne = new KWDReactPluginOne();