This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## LEVERAGE BROWSER CACHING ## | |
## https://gtmetrix.com/leverage-browser-caching.html ## | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg "access plus 1 year" | |
ExpiresByType image/jpeg "access plus 1 year" | |
ExpiresByType image/gif "access plus 1 year" | |
ExpiresByType image/png "access plus 1 year" | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType application/pdf "access plus 1 month" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#the infomration in this notice MUST BE CUSTOMIZED PER SITE | |
#If the CMG JS has not been updated to CDN OR is NOT enqueued, leave a note for Victoria so a task can be created or so she can give you approval to swap it out | |
#If SCSS/Foundation or Shared Hosting does not apply to the site, it can be left out of the the admin notice | |
// Admin Notice | |
function your_admin_notice(){ | |
echo '<div class="update-nag"> | |
<p>Version Control is <span style="color:green; font-weight: bold;">ACTIVE</span> for this site.</p> | |
<p>Mobile Site: <span style="color:green; font-weight: bold;">YES - Responsive/Theme Switcher/Third Party</span> / <span style="color:red; font-style:italic;">NO</span></p> | |
<p>CMG CDN JS Enqueued: <span style="color:green; font-weight: bold;">YES</span> / <span style="color:red; font-style:italic;">NO - Enqueued, Not CDN OR CDN, Not enqueued</span></p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add to an existing enqueue function | |
wp_enqueue_script( 'cmg-form-js', 'https://dil34hcn6yju7.cloudfront.net/assets/cmgform.js', null, null, false ); | |
#add a separate enqueue function | |
// CMG Form Script | |
function cmg_cdn_script() { | |
wp_enqueue_script( 'cmg-form-js', 'https://dil34hcn6yju7.cloudfront.net/assets/cmgform.js', null, null, false ); | |
} | |
add_action( 'wp_enqueue_scripts', 'cmg_cdn_script' ); |