-
Notifications
You must be signed in to change notification settings - Fork 6
/
custom-fonts.php
91 lines (77 loc) · 2.58 KB
/
custom-fonts.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/**
* Plugin Name: Custom Fonts
* Plugin URI: http://www.wpastra.com/
* Description: Upload your own custom font or choose from a vast collection of Google fonts, all hosted directly on your server. Enjoy improved performance, enhanced privacy, and full site editing theme support. Take control of your website's typography without compromising performance, privacy or compliance!
* Author: Brainstorm Force
* Author URI: http://www.brainstormforce.com
* Text Domain: custom-fonts
* Version: 2.1.8
*
* @package Bsf_Custom_Fonts
*/
/**
* Exit if accessed directly.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit();
}
/**
* Set constants.
*/
define( 'BSF_CUSTOM_FONTS_FILE', __FILE__ );
define( 'BSF_CUSTOM_FONTS_BASE', plugin_basename( BSF_CUSTOM_FONTS_FILE ) );
define( 'BSF_CUSTOM_FONTS_DIR', plugin_dir_path( BSF_CUSTOM_FONTS_FILE ) );
define( 'BSF_CUSTOM_FONTS_URI', plugins_url( '/', BSF_CUSTOM_FONTS_FILE ) );
define( 'BSF_CUSTOM_FONTS_VER', '2.1.8' );
define( 'BSF_CUSTOM_FONTS_POST_TYPE', 'bsf_custom_fonts' );
define( 'BSF_CUSTOM_FONTS_ADMIN_PAGE', 'bsf-custom-fonts' );
/**
* BSF Custom Fonts
*/
require_once BSF_CUSTOM_FONTS_DIR . 'classes/class-bsf-custom-fonts.php';
/**
* Helper functions needed for further processing.
*/
require_once BSF_CUSTOM_FONTS_DIR . '/includes/helper-functions.php';
/**
* BSF Custom Fonts Background Updater.
*/
require_once BSF_CUSTOM_FONTS_DIR . 'includes/plugin-update/class-custom-fonts-update.php';
/**
* Rest API support.
*/
require_once BSF_CUSTOM_FONTS_DIR . 'includes/class-custom-fonts-api-init.php';
/**
* WP Filesystem extender.
*/
require_once BSF_CUSTOM_FONTS_DIR . '/includes/class-bcf-filesystem.php';
/**
* Plugin's Google fonts compatibility processor.
*/
require_once BSF_CUSTOM_FONTS_DIR . '/includes/class-bcf-google-fonts-compatibility.php';
if ( is_admin() ) {
/**
* Admin Notice Library Settings
*/
require_once BSF_CUSTOM_FONTS_DIR . 'lib/notices/class-astra-notices.php';
/**
* Admin dashboard app.
*/
require_once BSF_CUSTOM_FONTS_DIR . 'admin/dashboard/class-bsf-custom-font-admin-loader.php';
}
// BSF Analytics library.
if ( ! class_exists( 'BSF_Analytics_Loader' ) ) {
require_once BSF_CUSTOM_FONTS_DIR . 'admin/bsf-analytics/class-bsf-analytics-loader.php';
}
$bsf_analytics = BSF_Analytics_Loader::get_instance();
$bsf_analytics->set_entity(
array(
'bsf' => array(
'product_name' => 'Custom Fonts',
'path' => BSF_CUSTOM_FONTS_DIR . 'admin/bsf-analytics',
'author' => 'Brainstorm Force',
'time_to_display' => '+24 hours',
),
)
);