-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinline-typography-controls.php
More file actions
50 lines (45 loc) · 1.09 KB
/
Copy pathinline-typography-controls.php
File metadata and controls
50 lines (45 loc) · 1.09 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
<?php
/**
* Plugin Name: Inline Typography Controls
* Description: Add inline typography controls to the editor.
* Version: 0.5.2
* Author: Toro_Unit
* License: GPL-3.0+
* GitHub Plugin URI: https://github.com/torounit/inline-typography-controls
* Release Asset: true
*
* @package inline-typography-controls
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_action(
'enqueue_block_editor_assets',
function () {
wp_enqueue_style(
'inline-typography-controls-editor-styles',
plugin_dir_url( __FILE__ ) . '/build/index.css',
array(),
filemtime( __DIR__ . '/build/index.css' )
);
$asset_file = include __DIR__ . '/build/index.asset.php';
wp_enqueue_script(
'inline-typography-controls',
plugin_dir_url( __FILE__ ) . '/build/index.js',
$asset_file['dependencies'],
filemtime( __DIR__ . '/build/index.js' ),
true
);
}
);
add_action(
'enqueue_block_assets',
function () {
wp_enqueue_style(
'inline-typography-controls-styles',
plugin_dir_url( __FILE__ ) . '/build/style-index.css',
array(),
filemtime( __DIR__ . '/build/style-index.css' )
);
}
);