salmancreation

azent_google_fonts enqueue

Mar 31st, 2026
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.93 KB | None | 0 0
  1. wp_enqueue_style('azent-fonts', azent_google_fonts(), array(), null);
  2.  
  3. function azent_google_fonts()
  4. {
  5.     $fonts_url = '';
  6.  
  7.     /*
  8.      * translators: If there are characters in your language that are not supported
  9.      * by Libre Franklin, translate this to 'off'. Do not translate into your own language.
  10.      */
  11.     $roboto   = _x('on', 'Roboto font: on or off', 'azent');
  12.  
  13.     if ('off' !== $roboto) {
  14.         $fonts_url = 'https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap&family=DM+Sans:ital,opsz,wght@0,9..40,100;0,9..40,200;0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;0,9..40,900;0,9..40,1000;1,9..40,100;1,9..40,200;1,9..40,300;1,9..40,400;1,9..40,500;1,9..40,600;1,9..40,700;1,9..40,800;1,9..40,900;1,9..40,1000&display=swap';
  15.     }
  16.  
  17.  
  18.     return esc_url_raw($fonts_url);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment