How to Use and Disable Custom Fonts in AlertsDLX

This section will cover how to disable the AlertsDLX Lato font for performance and specify your own fonts for AlertsDLX to use.

Disable the Lato font using filter: alerts_dlx_load_fonts

Use the following code snippet to disable the Lato font. This should improve performance and prevent loading the Lato font files.

/**
 * This disables the AlertsDLX Fonts.
 */
add_filter( 'alerts_dlx_load_fonts', '__return_false' );

Use an Alternate Font using filter: alerts_dlx_default_font_family

Use the following to load an alternate font, for example, a font from your theme.

<?php
/**
 * AlertsDLX Disable Fonts
 *
 * @package AlertsDLX
 * @subpackage Fonts
 * @since 2.3.0
 */

/**
 * This disables the AlertsDLX Fonts.
 */
add_filter( 'alerts_dlx_load_fonts', '__return_false' );

/**
 * This changes the default font family to Raleway.
 * @return string The default font family.
 */
add_filter(
	'alerts_dlx_default_font_family',
	function () {
		return 'Raleway, sans-serif';
	}
);

Last updated