Skip to content

Instantly share code, notes, and snippets.

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 sproutventure/853611 to your computer and use it in GitHub Desktop.
Save sproutventure/853611 to your computer and use it in GitHub Desktop.
/**
* Unhook regsitration_form_addons from parent theme on init. Hooking to init because register_form has already been hooked-in
*
* @author Dan Cameron
*/
add_action('init', 'unhook_registration_form_addons');
function unhook_registration_form_addons()
{
remove_action( 'register_form', 'registration_form_addons' );
}
/**
* Add a new registration form element.
*
* @author Dan Cameron
*/
add_action( 'register_form', 'registration_form_addons_new' );
function registration_form_addons_new()
{
?>
<span class="check clearfix">
<input type="checkbox" name="gbs_profile[group-buying-opt-in]" value="TRUE" checked="checked"> <?php _e('Subscribe to our deals.', 'groupbuyingtheme'); ?>
</span>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment