Last active
February 20, 2017 11:58
-
-
Save jauhari/5bf38428d32c0e7ed18eb2c088889b8d to your computer and use it in GitHub Desktop.
Added Custom CSS on WordPress that support Live Preview and bypass any Cache system
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
<?php | |
add_action( 'wp_enqueue_scripts', 'idnme' ); | |
function idnme() { | |
wp_enqueue_style( 'idnme', get_stylesheet_directory_uri() . '/me.css'.get_the_date_hash('Y-m-d His'), array() ); | |
} | |
function the_date_hash($param = 'Y-m-d H:i:s') | |
{ | |
echo get_the_date_hash($param); | |
} | |
function get_the_date_hash($param = 'Y-m-d H:i:s') | |
{ | |
return '?hash=' . md5(date($param)); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment