1 | <?php |
||
21 | class Kirki_Modules_Webfonts { |
||
22 | |||
23 | /** |
||
24 | * Which method to use when loading googlefonts. |
||
25 | * Available options: link, js, embed. |
||
26 | * |
||
27 | * @static |
||
28 | * @access private |
||
29 | * @since 3.0.0 |
||
30 | * @var string |
||
31 | */ |
||
32 | private static $method = array( |
||
33 | 'global' => 'embed', |
||
34 | ); |
||
35 | |||
36 | /** |
||
37 | * Whether we should fallback to the link method or not. |
||
38 | * |
||
39 | * @access private |
||
40 | * @since 3.0.0 |
||
41 | * @var bool |
||
42 | */ |
||
43 | private $fallback_to_link = false; |
||
44 | |||
45 | /** |
||
46 | * The Kirki_Fonts_Google object. |
||
47 | * |
||
48 | * @access protected |
||
49 | * @since 3.0.0 |
||
50 | * @var object |
||
51 | */ |
||
52 | protected $fonts_google; |
||
53 | |||
54 | |||
55 | /** |
||
56 | * The class constructor |
||
57 | * |
||
58 | * @access public |
||
59 | * @since 3.0.0 |
||
60 | */ |
||
61 | public function __construct() { |
||
71 | |||
72 | /** |
||
73 | * Init other objects depending on the method we'll be using. |
||
74 | * |
||
75 | * @access protected |
||
76 | * @since 3.0.0 |
||
77 | */ |
||
78 | protected function init() { |
||
88 | |||
89 | /** |
||
90 | * Parses fields and if any tooltips are found, they are added to the |
||
91 | * object's $tooltips_content property. |
||
92 | * |
||
93 | * @access private |
||
94 | * @since 3.0.0 |
||
95 | */ |
||
96 | private function parse_fields() { |
||
102 | |||
103 | /** |
||
104 | * Get the method we're going to use. |
||
105 | * |
||
106 | * @access public |
||
107 | * @since 3.0.0 |
||
108 | * @return string |
||
109 | */ |
||
110 | public function get_method( $config_id ) { |
||
124 | |||
125 | /** |
||
126 | * Should we fallback to link method? |
||
127 | * |
||
128 | * @access protected |
||
129 | * @since 3.0.0 |
||
130 | */ |
||
131 | protected function maybe_fallback_to_link() { |
||
145 | |||
146 | /** |
||
147 | * Goes through all our fields and then populates the $this->fonts property. |
||
148 | * |
||
149 | * @access public |
||
150 | */ |
||
151 | public function loop_fields() { |
||
156 | } |
||
157 |