Created
August 31, 2018 22:37
-
-
Save KaineLabs/bc9a713c5c48bfee6ab3ebb6ff506b81 to your computer and use it in GitHub Desktop.
Make New Accounts Follows Specific Users.
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 | |
/** | |
* Make New Accounts Follows Specific Users. | |
*/ | |
function yzc_make_new_accounts_follows_specific_users( $user_id ) { | |
// Get Leaders. | |
$leaders = array( 2, 4 ); | |
foreach ( $leaders as $leader_id ) { | |
// Get Follow Args. | |
$args = array( | |
'leader_id' => $leader_id, | |
'follower_id' => $user_id, | |
); | |
// Follow . | |
bp_follow_start_following( $args ); | |
} | |
} | |
add_action( 'bp_core_signup_user', 'yzc_make_new_accounts_follows_specific_users' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment