-
Notifications
You must be signed in to change notification settings - Fork 1
/
web-font-optimization.php
executable file
·67 lines (61 loc) · 1.68 KB
/
web-font-optimization.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
57
58
59
60
61
62
63
64
65
66
67
<?php
namespace O10n;
/**
* Web Font Optimization
*
* Advanced Web Font optimization toolkit. Font Face API, Web Font Observer, Google Font Loader, Critical CSS, HTTP/2 Server Push, async and timed font rendering and more.
*
* @link https://github.com/o10n-x/
* @package o10n
*
* @wordpress-plugin
* Plugin Name: Web Font Optimization
* Description: Advanced Web Font optimization toolkit. Font Face API, Web Font Observer, Google Font Loader, Critical CSS, HTTP/2 Server Push, async and timed font rendering and more.
* Version: 0.0.47
* Author: Optimization.Team
* Author URI: https://optimization.team/
* GitHub Plugin URI: https://github.com/o10n-x/wordpress-font-optimization
* Text Domain: o10n
* Domain Path: /languages
*/
if (! defined('WPINC')) {
die;
}
// abort loading during upgrades
if (defined('WP_INSTALLING') && WP_INSTALLING) {
return;
}
// settings
$module_version = '0.0.47';
$minimum_core_version = '0.0.44';
$plugin_path = dirname(__FILE__);
// load the optimization module loader
if (!class_exists('\O10n\Module')) {
require $plugin_path . '/core/controllers/module.php';
}
// load module
new Module(
'fonts',
'Web Font Optimization',
$module_version,
$minimum_core_version,
array(
'core' => array(
'http',
'client',
'fonts'
),
'admin' => array(
'AdminFonts'
)
),
5,
array(
'google_webfonts_api' => array(
'hash_dir' => 'fonts/google/',
'file_ext' => '.json',
'expire' => 86400 // expire after 1 day
)
),
__FILE__
);