Skip to content

Commit

Permalink
Stub out practice functino for #690
Browse files Browse the repository at this point in the history
  • Loading branch information
benlk committed Oct 24, 2016
1 parent 826545d commit a3034dd
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions inc/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@
* Start updates and helpers
* ------------------------------------------------------ */

/**
* For initial activations of Largo, where no largo was previously installed
*
* @since 0.5.5
* @return Bool false if the initial setup functions were not run, true if they were.
* @link https://github.com/INN/Largo/issues/690
*/
function largo_activation_maybe_setup() {
var_log( "Should setup be done?" );
if ( of_get_option( 'largo_version' ) ) {
var_log( "No.");
return false;
}
var_log( "Yes.");

// this must run before any other function that makes use of of_set_option()
largo_set_new_option_defaults();
of_set_option( 'largo_version', largo_version() );

return true;
}
add_action( 'after_switch_theme', 'largo_activation_maybe_setup' );

/**
* Performs various update functions and set a new verion number.
*
Expand Down

0 comments on commit a3034dd

Please sign in to comment.