Переглянути джерело

Trigger font management actions as a high priority number to ensure all 'em block are registered

Jason Crist 3 роки тому
батько
коміт
a412901e0d

+ 2 - 2
blockbase/inc/fonts/blockbase-fonts-provider.php

@@ -130,8 +130,8 @@ function register_blockbase_fonts_provider() {
 	}
 	}
 
 
 }
 }
-add_action( 'init', 'register_blockbase_fonts_provider' );
-add_action( 'init', 'provider_enqueue_global_styles_fonts' );
+add_action( 'init', 'register_blockbase_fonts_provider', 100 );
+add_action( 'init', 'provider_enqueue_global_styles_fonts', 101 );
 
 
 // NOTE: As far as I can tell you can't assign a font-family at the individual block level
 // NOTE: As far as I can tell you can't assign a font-family at the individual block level
 // which is what this logic is for.  This may someday be necessary but I don't believe it is now.
 // which is what this logic is for.  This may someday be necessary but I don't believe it is now.

+ 1 - 2
blockbase/inc/fonts/custom-font-migration.php

@@ -1,7 +1,6 @@
 <?php
 <?php
 
 
-// Use an early priority to migrate legacy font settings before registering fonts
-add_action( 'init', 'migrate_blockbase_custom_fonts' );
+add_action( 'init', 'migrate_blockbase_custom_fonts', 99 );
 
 
 function migrate_blockbase_custom_fonts() {
 function migrate_blockbase_custom_fonts() {