Last active
February 5, 2024 09:59
-
-
Save andreiglingeanu/4d4191d4f0a1af074fc438b38097bc9e to your computer and use it in GitHub Desktop.
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
<?php | |
if (! function_exists('write_log')) { | |
function write_log($log) { | |
if (is_array($log) || is_object($log)) { | |
error_log(print_r($log, true)); | |
} else { | |
error_log($log); | |
} | |
} | |
} | |
add_filter( | |
'blocksy_ext_custom_fonts:dynamic_fonts', | |
function ($fonts) { | |
write_log([ | |
'action' => 'blocksy_ext_custom_fonts:dynamic_fonts', | |
'site_url' => get_site_url(), | |
'font_url' => blc_normalize_site_url(THEME_FONTS_URI . '/Buffalo.woff2') | |
]); | |
$fonts[] = [ | |
'name' => 'Buffalo', | |
'fontType' => 'regular', | |
'variations' => [ | |
[ | |
'variation' => 'n4', | |
'url' => blc_normalize_site_url(THEME_FONTS_URI . '/Buffalo.woff2') | |
], | |
], | |
]; | |
return $fonts; | |
} | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment