Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: “Auto Group Join” plugin added

How to make it work with WordPress Single Blog:

Step 1
—-
Go into the plugin folder and open the bp-auto-group-join.php file. Line 67 should be:
`add_submenu_page( ‘wpmu-admin.php’, __(“Link Auto Join Groups”, ‘buddypress’), __(“Auto Join Groups”, ‘buddypress’), 1, __FILE__, “auto_group_join_plugin_options” );`

change it to this:
`add_submenu_page( ‘options-general.php’, __(“Link Auto Join Groups”, ‘buddypress’), __(“Auto Join Groups”, ‘buddypress’), 1, __FILE__, “auto_group_join_plugin_options” );`

That first argument just tells the action hook `add_submenu_page()` where your plugin menu item should go based on page slug. The options-general.php slug corresponds to the “Settings” menu. So you’ll get a link for the plugin settings under the Settings menu. I couldn’t figure out how to add the link to the BuddyPress menu since that menu works a little differently.

Step 2
—-
Go to line 147:
`add_action( ‘wpmu_new_user’, ‘update_auto_join_status’, 12, 2);`

Add add this new line below it:
`add_action( ‘user_register’, ‘update_auto_join_status’, 12, 2);`

I figured the wpmu_new_user action hook wouldn’t work with single WP. I was right. I tested with the additional user_register hook and it works. Joy

Skip to toolbar