PHP Класс Disable_Google_Fonts

Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( ) Hook actions and filters.
action_links ( array $links, string $plugin_file ) : array Add action links to plugins page.
disable_bitter ( string $translations, string $text, string $context, string $domain ) : string Force 'off' as a result of Bitter font toggler string translation.
disable_inconsolata ( string $translations, string $text, string $context, string $domain ) : string Force 'off' as a result of Inconsolata font toggler string translation.
disable_lato ( string $translations, string $text, string $context, string $domain ) : string Force 'off' as a result of Lato font toggler string translation.
disable_libre_franklin ( string $translations, string $text, string $context, string $domain ) : string Force 'off' as a result of Libre Franklin font toggler string translation.
disable_merriweather ( string $translations, string $text, string $context, string $domain ) : string Force 'off' as a result of Merriweather font toggler string translation.
disable_montserrat ( string $translations, string $text, string $context, string $domain ) : string Force 'off' as a result of Montserrat font toggler string translation.
disable_noto_sans ( string $translations, string $text, string $context, string $domain ) : string Force 'off' as a result of Noto Sans font toggler string translation.
disable_noto_serif ( string $translations, string $text, string $context, string $domain ) : string Force 'off' as a result of Noto Serif font toggler string translation.
disable_open_sans ( string $translations, string $text, string $context, string $domain ) : string Force 'off' as a result of Open Sans font toggler string translation.
disable_source_sans_pro ( string $translations, string $text, string $context, string $domain ) : string Force 'off' as a result of Source Sans Pro font toggler string translation.
register_theme_fonts_disabler ( ) Register filters that disable fonts for bundled themes.

Описание методов

__construct() публичный Метод

Hook actions and filters.
С версии: 1.0
public __construct ( )

disable_bitter() публичный Метод

Force 'off' as a result of Bitter font toggler string translation.
С версии: 1.0
public disable_bitter ( string $translations, string $text, string $context, string $domain ) : string
$translations string Translated text.
$text string Text to translate.
$context string Context information for the translators.
$domain string Text domain. Unique identifier for retrieving translated strings.
Результат string $translations Translated text.

disable_inconsolata() публичный Метод

Force 'off' as a result of Inconsolata font toggler string translation.
С версии: 1.1
public disable_inconsolata ( string $translations, string $text, string $context, string $domain ) : string
$translations string Translated text.
$text string Text to translate.
$context string Context information for the translators.
$domain string Text domain. Unique identifier for retrieving translated strings.
Результат string $translations Translated text.

disable_lato() публичный Метод

Force 'off' as a result of Lato font toggler string translation.
С версии: 1.0
public disable_lato ( string $translations, string $text, string $context, string $domain ) : string
$translations string Translated text.
$text string Text to translate.
$context string Context information for the translators.
$domain string Text domain. Unique identifier for retrieving translated strings.
Результат string $translations Translated text.

disable_libre_franklin() публичный Метод

Force 'off' as a result of Libre Franklin font toggler string translation.
С версии: 1.3
public disable_libre_franklin ( string $translations, string $text, string $context, string $domain ) : string
$translations string Translated text.
$text string Text to translate.
$context string Context information for the translators.
$domain string Text domain. Unique identifier for retrieving translated strings.
Результат string $translations Translated text.

disable_merriweather() публичный Метод

Force 'off' as a result of Merriweather font toggler string translation.
С версии: 1.2
public disable_merriweather ( string $translations, string $text, string $context, string $domain ) : string
$translations string Translated text.
$text string Text to translate.
$context string Context information for the translators.
$domain string Text domain. Unique identifier for retrieving translated strings.
Результат string $translations Translated text.

disable_montserrat() публичный Метод

Force 'off' as a result of Montserrat font toggler string translation.
С версии: 1.2
public disable_montserrat ( string $translations, string $text, string $context, string $domain ) : string
$translations string Translated text.
$text string Text to translate.
$context string Context information for the translators.
$domain string Text domain. Unique identifier for retrieving translated strings.
Результат string $translations Translated text.

disable_noto_sans() публичный Метод

Force 'off' as a result of Noto Sans font toggler string translation.
С версии: 1.1
public disable_noto_sans ( string $translations, string $text, string $context, string $domain ) : string
$translations string Translated text.
$text string Text to translate.
$context string Context information for the translators.
$domain string Text domain. Unique identifier for retrieving translated strings.
Результат string $translations Translated text.

disable_noto_serif() публичный Метод

Force 'off' as a result of Noto Serif font toggler string translation.
С версии: 1.1
public disable_noto_serif ( string $translations, string $text, string $context, string $domain ) : string
$translations string Translated text.
$text string Text to translate.
$context string Context information for the translators.
$domain string Text domain. Unique identifier for retrieving translated strings.
Результат string $translations Translated text.

disable_open_sans() публичный Метод

Force 'off' as a result of Open Sans font toggler string translation.
С версии: 1.0
public disable_open_sans ( string $translations, string $text, string $context, string $domain ) : string
$translations string Translated text.
$text string Text to translate.
$context string Context information for the translators.
$domain string Text domain. Unique identifier for retrieving translated strings.
Результат string $translations Translated text.

disable_source_sans_pro() публичный Метод

Force 'off' as a result of Source Sans Pro font toggler string translation.
С версии: 1.0
public disable_source_sans_pro ( string $translations, string $text, string $context, string $domain ) : string
$translations string Translated text.
$text string Text to translate.
$context string Context information for the translators.
$domain string Text domain. Unique identifier for retrieving translated strings.
Результат string $translations Translated text.

register_theme_fonts_disabler() публичный Метод

This filters can be directly hooked as Disable_Google_Fonts::disable_open_sans() but that would mean that comparison is done on each string for each font which creates performance issues. Instead we check active template's name very late and just once and hook appropriate filters. Note that Open Sans disabler is used for both WordPress core and for Twenty Twelve theme.
С версии: 1.0