|
@@ -107,7 +107,12 @@ if ( ! function_exists( 'seedlet_setup' ) ) :
|
|
|
add_theme_support( 'editor-styles' );
|
|
|
|
|
|
// Enqueue editor styles.
|
|
|
- add_editor_style( './assets/css/style-editor.css' );
|
|
|
+ add_editor_style(
|
|
|
+ array(
|
|
|
+ apply_filters( 'seedlet_editor_fonts', './assets/css/fonts-editor.css' ),
|
|
|
+ './assets/css/style-editor.css',
|
|
|
+ )
|
|
|
+ );
|
|
|
|
|
|
// Add custom editor font sizes.
|
|
|
add_theme_support(
|
|
@@ -306,6 +311,9 @@ add_action( 'after_setup_theme', 'seedlet_content_width', 0 );
|
|
|
* Enqueue scripts and styles.
|
|
|
*/
|
|
|
function seedlet_scripts() {
|
|
|
+ // Fonts
|
|
|
+ wp_enqueue_style( 'seedlet-fonts', get_template_directory_uri() . '/assets/css/fonts.css', array(), wp_get_theme()->get( 'Version' ), 'print' );
|
|
|
+
|
|
|
// Theme styles
|
|
|
if (preg_match('~MSIE|Internet Explorer~i', $_SERVER['HTTP_USER_AGENT']) || (strpos($_SERVER['HTTP_USER_AGENT'], 'Trident/7.0; rv:11.0') !== false)) {
|
|
|
// If IE 11 or below, use a flattened stylesheet with static values replacing CSS Variables
|
|
@@ -331,6 +339,14 @@ function seedlet_scripts() {
|
|
|
}
|
|
|
add_action( 'wp_enqueue_scripts', 'seedlet_scripts' );
|
|
|
|
|
|
+/**
|
|
|
+ * Allow the editor fonts to be filterable for child themes.
|
|
|
+ */
|
|
|
+function seedlet_filter_fonts_url( $editor_fonts_url ){
|
|
|
+ return $editor_fonts_url;
|
|
|
+}
|
|
|
+add_filter( 'seedlet_editor_fonts', 'seedlet_filter_fonts_url' );
|
|
|
+
|
|
|
/**
|
|
|
* Fix skip link focus in IE11.
|
|
|
*
|