This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Responsible to modify the fonts list in the font control. | |
*/ | |
function modify_controls( $controls_registry ) { | |
// First we get the fonts setting of the font control | |
$fonts = $controls_registry->get_control( 'font' )->get_settings( 'fonts' ); | |
// Then we append the custom font family in the list of the fonts we retrieved in the previous step | |
$new_fonts = array_merge( [ 'Custom Font Family Name' => 'system' ], $fonts ); | |
// Then we set a new list of fonts as the fonts setting of the font control | |
$controls_registry->get_control( 'font' )->set_settings( 'fonts', $new_fonts ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rus_to_latin ( str ) { | |
var ru = { | |
'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd', | |
'е': 'e', 'ё': 'e', 'ж': 'j', 'з': 'z', 'и': 'i', | |
'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', 'о': 'o', | |
'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 'у': 'u', | |
'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch', 'ш': 'sh', | |
'щ': 'shch', 'ы': 'y', 'э': 'e', 'ю': 'u', 'я': 'ya' | |
}, n_str = []; |