AI Verified

Name

Ensure Webfont is Loaded (Non-Elementor)

About

Ensure Webfont is loaded

Language

PHP

Rating

Voted: 1 by 1 user(s)

Codevault

WebSquadron

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.1

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

12/04/2024

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Ensure Webfont is Loaded (Non-Elementor)

 
                    
1function custom_font_display( $current_value, $font_family, $data ) {
2 return 'swap';
3}
4add_filter( 'font_display', 'custom_font_display', 10, 3 );

1

Related Snippets

Please see some snippets below related to this snippet..

Performance

AI Verified

0

Stop Lazy Load for 1 Image

Added: 1 year ago

Last Updated: 1 year ago

Hover over your image in the Media Library to get the ID value and then replace the 10576 in the code.

Performance

AI Verified

1

Remove Google Fonts (Non Elementor)

Added: 1 year ago

Last Updated: 3 months ago

Removed Google Fonts for Non Elementor Websites

Performance

AI Verified

0

Disable Specific Plugins on Production Environments [SnipSnip.pro]

Added: 5 months ago

Last Updated: 5 months ago

<p>Disables the specified plugins on non-production environments (based on the site URL). You can specific which plugins you want deactivated by placing the plugin's slug in the `PLUGINS_TO_DEACTIVATE...

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

Performance

AI Verified

33

Remove Unused Javascript

Added: 1 year ago

Last Updated: 4 hours ago

Remove Unused Javascript - and improve your Page Speed Insight Score

WooCommerce

Pro Verified

10

Deactivate some WooCommerce Checkout Fields

Added: 1 year ago

Last Updated: 3 weeks ago

Deactivate some WooCommerce Checkout Fields from showing

Elementor

AI Verified

6

CSS Grid Aid

Added: 8 months ago

Last Updated: 2 months ago

This can be used for any WordPress Builder to aid working with CSS Grids.