Skip to content

Instantly share code, notes, and snippets.

@lloc
Last active October 3, 2015 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lloc/2365801 to your computer and use it in GitHub Desktop.
Save lloc/2365801 to your computer and use it in GitHub Desktop.
My Refresh Plugin
<?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