Advertisement
fauzanjeg

Call manually CDN Font Awesome for AMP Page

Jul 9th, 2021
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. /* Call manually CDN Font Awesome for AMP Page */
  2. function add_fontawesome_cdn() {
  3.     // echo '<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css">';
  4.     echo '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />';
  5. }
  6. add_action( 'amp_post_template_head', 'add_fontawesome_cdn' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement