Created
July 28, 2017 14:26
-
-
Save danielbachhuber/cd854c909e842367a86749126c622e6b to your computer and use it in GitHub Desktop.
Create a byline when a new user is created
This file contains hidden or 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 | |
/** | |
* Create a byline when a new user is created. | |
* | |
* @see https://bylines.io/docs/create-new-byline-automatically-user/ | |
*/ | |
add_action( 'user_register', function( $user_id ) { | |
\Bylines\Objects\Byline::create_from_user( $user_id ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment