load.php
34 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 | /** |
| 12 | * Filters whether to skip loading the Jetpack Google Fonts module. |
| 13 | * |
| 14 | * This filter allows skipping the loading of the Jetpack Google Fonts module |
| 15 | * based on specific conditions or requirements. By default, the module will |
| 16 | * load normally. If the filter returns true, the module will be skipped. |
| 17 | * |
| 18 | * @module google-fonts |
| 19 | * |
| 20 | * @since 13.4 |
| 21 | * |
| 22 | * @param bool $skip Whether to skip loading the Jetpack Google Fonts module. Default false. |
| 23 | */ |
| 24 | if ( apply_filters( 'jetpack_google_fonts_skip_load', false ) ) { |
| 25 | return; |
| 26 | } |
| 27 | |
| 28 | require_once __DIR__ . '/current/load-google-fonts.php'; |
| 29 | }, |
| 30 | // Ensure the action is loaded after the late_initialization. |
| 31 | // See projects/plugins/jetpack/class.jetpack.php. |
| 32 | 999 |
| 33 | ); |
| 34 |