Run migrations on every load
This commit is contained in:
parent
9c1260c9d0
commit
d115480f47
@ -15,7 +15,10 @@ add_action( 'user_register', function( $user_id ) {
|
||||
} );
|
||||
|
||||
add_action( 'pterotype_init', function() {
|
||||
\migrations\run_migrations();
|
||||
\actors\initialize_user_actors();
|
||||
} );
|
||||
|
||||
add_action( 'pterotype_load', function() {
|
||||
\migrations\run_migrations();
|
||||
} );
|
||||
?>
|
||||
|
@ -7,9 +7,10 @@ require_once plugin_dir_path( __FILE__ ) . 'inc/init.php';
|
||||
define( 'PTEROTYPE_VERSION', '0.0.1' );
|
||||
|
||||
function pterotype_init() {
|
||||
update_option( 'pterotype_version', PTEROTYPE_VERSION );
|
||||
do_action( 'pterotype_init' );
|
||||
}
|
||||
|
||||
do_action( 'pterotype_load' );
|
||||
|
||||
register_activation_hook( __FILE__, 'pterotype_init');
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user