-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtinybit-core.php
More file actions
51 lines (45 loc) · 888 Bytes
/
tinybit-core.php
File metadata and controls
51 lines (45 loc) · 888 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
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* Plugin Name: TinyBit Core
* Plugin URI: PLUGIN SITE HERE
* Description: PLUGIN DESCRIPTION HERE
* Author: YOUR NAME HERE
* Author URI: YOUR SITE HERE
* Text Domain: tinybit-core
* Domain Path: /languages
* Version: 0.3.0
*
* @package TBC
*/
require __DIR__ . '/000-loader.php';
/*
* TBC\Frontend
*/
tbc_register_class_hooks(
'TBC\Frontend',
[
[ 'the_content', 'filter_the_content_early', 1 ],
]
);
/*
* TBC\Media
*/
tbc_register_class_hooks(
'TBC\Media',
[
[ 'wp_generate_attachment_metadata', 10, 2 ],
]
);
add_filter( 'wp_omit_loading_attr_threshold', '__return_zero' );
/*
* TBC\Integrations\Cloudflare
*/
tbc_register_class_hooks(
'TBC\Integrations\Cloudflare',
[
[ 'cloudflare_purge_by_url' ],
]
);
if ( defined( 'WP_CLI' ) && WP_CLI ) {
WP_CLI::add_command( 'tbc', 'TBC\CLI' );
}