1 | <?php |
||
16 | final class Kirki_Modules_Webfonts_Embed { |
||
17 | |||
18 | /** |
||
19 | * The config ID. |
||
20 | * |
||
21 | * @access protected |
||
22 | * @since 3.0.0 |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $config_id; |
||
26 | |||
27 | /** |
||
28 | * The Kirki_Modules_Webfonts object. |
||
29 | * |
||
30 | * @access protected |
||
31 | * @since 3.0.0 |
||
32 | * @var object |
||
33 | */ |
||
34 | protected $webfonts; |
||
35 | |||
36 | /** |
||
37 | * The Kirki_Fonts_Google object. |
||
38 | * |
||
39 | * @access protected |
||
40 | * @since 3.0.0 |
||
41 | * @var object |
||
42 | */ |
||
43 | protected $googlefonts; |
||
44 | |||
45 | /** |
||
46 | * The google link |
||
47 | * |
||
48 | * @access public |
||
49 | * @var string |
||
50 | */ |
||
51 | public $link = ''; |
||
52 | |||
53 | /** |
||
54 | * Constructor. |
||
55 | * |
||
56 | * @access public |
||
57 | * @since 3.0 |
||
58 | * @param string $config_id The config-ID. |
||
59 | * @param object $webfonts The Kirki_Modules_Webfonts object. |
||
60 | * @param object $googlefonts The Kirki_Fonts_Google object. |
||
61 | * @param array $args Extra args we want to pass. |
||
62 | */ |
||
63 | public function __construct( $config_id, $webfonts, $googlefonts, $args = array() ) { |
||
72 | |||
73 | /** |
||
74 | * Adds inline css. |
||
75 | * |
||
76 | * @access public |
||
77 | * @since 3.0.0 |
||
78 | */ |
||
79 | public function inline_css() { |
||
82 | |||
83 | /** |
||
84 | * Embeds the CSS from googlefonts API inside the Kirki output CSS. |
||
85 | * |
||
86 | * @access public |
||
87 | * @since 3.0.0 |
||
88 | * @param string $css The original CSS. |
||
89 | * @return string The modified CSS. |
||
90 | */ |
||
91 | public function embed_css( $css = '' ) { |
||
112 | |||
113 | /** |
||
114 | * Get the contents of a remote google-fonts link. |
||
115 | * Responses get cached for 1 day. |
||
116 | * |
||
117 | * @access protected |
||
118 | * @since 3.0.0 |
||
119 | * @param string $url The link we want to get. |
||
120 | * @return string|false Returns false if there's an error. |
||
121 | */ |
||
122 | protected function get_url_contents( $url = '' ) { |
||
175 | } |
||
176 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.