Created
August 22, 2012 20:19
-
-
Save itsananderson/3429020 to your computer and use it in GitHub Desktop.
Properly set up default settings
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 | |
register_activation_hook( __FILE__, 'halloween_store_install' ); | |
function halloween_store_install() { | |
//setup default option values | |
$default_options = array( | |
'currency_sign' => '$' | |
); | |
$options = get_option( 'halloween_options', $default_options ); | |
//save our default option values | |
update_option( 'halloween_options', $options ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment