Public Ticket #2282

Custom hooks in registration page

David Rall Replied 18 days, 23 hours ago on March 1st at 4:31pm

default avatar

David Rall

loyalty 2 Tickets

I think I have this one decoded now.  This seemed to work for account details:

add_action( 'bp_before_account_details_fields', 'my_bp_before_account_details_fields', 10, 0 ); /* 'before', 'account_details', */

function my_bp_before_account_details_fields ( )
{

}

I'm assuming the others would be like that except for the page, steps, and signup_profile references which, I think, should look like:

/**
* <?php bp_nouveau_signup_hook( 'before', 'page' );
*/
add_action( 'bp_before_register_page', 'my_bp_before_register_page', 10, 0 );

/**
* <?php bp_nouveau_signup_hook( 'custom', 'steps' );
*/
add_action( 'bp_custom_signup_steps', 'my_bp_custom_signup_steps', 10, 0 );

/**
* <?php bp_nouveau_signup_hook( '', 'signup_profile' );
*/
add_action( 'bp_signup_profile_fields', 'my_bp_signup_profile_fields', 10, 0 );

Let me know if I've decoded correctly.

Thanks,

DavidR

David Rall started a discussion March 1st at 3:28pm

default avatar

David Rall

loyalty 2 Tickets

Hi,

I am trying to add a tabbed interface to the registrtion page.  A working example is at:

https://allyu.org/wordpress/register/#tab1

Right now the changes are embedded in the register.php file of the parent theme and I would like to move them to the functions.php of the child theme for safe keeping between updates.  How can I find the signature of the hooks, possibly an example of a blank function to hook into these types of actions:

<?php bp_nouveau_signup_hook( 'before', 'page' );
<?php bp_nouveau_signup_hook( 'before', 'account_details' );
<?php bp_nouveau_signup_hook( 'after', 'account_details' );
<?php bp_nouveau_signup_hook( 'before', 'signup_profile' );
<?php bp_nouveau_signup_hook( '', 'signup_profile' );
<?php bp_nouveau_signup_hook( 'after', 'signup_profile' );
<?php bp_nouveau_signup_hook( 'custom', 'steps' );
<?php bp_nouveau_signup_hook( 'after', 'page' );

I've seen examples like this, but does not address the before or after syntax.

// define the bp_account_details_fields callback
function action_bp_account_details_fields( ) {
// make action magic happen here...
};

// add the action
add_action( 'bp_account_details_fields', 'action_bp_account_details_fields', 10, 0 );

Thanks for your help,

DavidR

Advertisement

Ticket Details

Friendly Reminder

Support Includes the Following:
  • checkAnswer related questions
  • checkRelated technical questions
  • checkAssistance with reported bugs and issues
  • checkHelp recommended 3rd party plugins
Not Included:
  • × Customization Services
  • × Installation Services
  • × 3rd Party Plugins Customisations