Last active
October 3, 2015 01:48
-
-
Save lloc/2365801 to your computer and use it in GitHub Desktop.
My Refresh Plugin
This file contains 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 | |
if ( !defined( 'MY_VERSION' ) ) | |
define( 'MY_VERSION', 0.1 ); | |
function my_refresh_plugin() { | |
if ( MY_VERSION != get_option( 'my_version' ) ) { | |
update_option( 'my_version', MY_VERSION ); | |
flush_rewrite_rules( false ); | |
} | |
} | |
add_action( 'init', 'my_refresh_plugin', 11, 0 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment