/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
phpunit/fixtures/mock-provider.php
26 строк
503 B
Tonya Mork
[Webfonts] Rename to Fonts API (#46749)
18 янв 2023, 15:30
Не верифицирован
18 янв 2023, 15:30
37bb7c5
Код
Авторство
О чём код?
<?php class Mock_Provider extends WP_Fonts_Provider { /** * The provider's unique ID. * * @var string */ protected $id = 'mock'; public function get_css() { $handles = array_keys( $this->fonts ); return implode( '; ', $handles ); } /** * Gets the `<style>` element for wrapping the `@font-face` CSS. * * @since X.X.X * * @return string The style element. */ protected function get_style_element() { return '<mock id="wp-fonts-mock" attr="some-attr">%s</mock>\n'; } }