load.php
23 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Load the google fonts based on the current WordPress version. |
| 4 | * |
| 5 | * @package automattic/jetpack |
| 6 | */ |
| 7 | |
| 8 | add_action( |
| 9 | 'plugins_loaded', |
| 10 | function () { |
| 11 | if ( class_exists( 'WP_Font_Face' ) ) { |
| 12 | // WordPress 6.5 or above with the new Font Library. |
| 13 | require_once __DIR__ . '/current/load-google-fonts.php'; |
| 14 | } elseif ( class_exists( 'WP_Fonts' ) || class_exists( 'WP_Webfonts' ) ) { |
| 15 | // Gutenberg Fonts API compatible. |
| 16 | require_once __DIR__ . '/wordpress-6.3/load-google-fonts.php'; |
| 17 | } |
| 18 | }, |
| 19 | // Ensure the action is loaded after the late_initialization. |
| 20 | // See projects/plugins/jetpack/class.jetpack.php. |
| 21 | 999 |
| 22 | ); |
| 23 |