Load WooCommerce Star fonts via inline styles.
This commit is contained in:
parent
db7f3ed04f
commit
24b0596c71
2 changed files with 14 additions and 20 deletions
|
@ -30,6 +30,20 @@ add_action( 'after_setup_theme', '_s_woocommerce_setup' );
|
|||
*/
|
||||
function _s_woocommerce_scripts() {
|
||||
wp_enqueue_style( '_s-woocommerce-style', get_template_directory_uri() . '/woocommerce.css' );
|
||||
|
||||
$font_path = WC()->plugin_url() . '/assets/fonts/';
|
||||
$inline_font = '@font-face {
|
||||
font-family: "star";
|
||||
src: url("' . $font_path . 'star.eot");
|
||||
src: url("' . $font_path . 'star.eot?#iefix") format("embedded-opentype"),
|
||||
url("' . $font_path . 'star.woff") format("woff"),
|
||||
url("' . $font_path . 'star.ttf") format("truetype"),
|
||||
url("' . $font_path . 'star.svg#star") format("svg");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}';
|
||||
|
||||
wp_add_inline_style( '_s-woocommerce-style', $inline_font );
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', '_s_woocommerce_scripts' );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue