-
-
Save danielbachhuber/ece7e8bb1a97ac4a1977 to your computer and use it in GitHub Desktop.
Adding a "Google Plus" profile field to Co-Authors Plus
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 | |
/** | |
* Add a "Google Plus" field to Co-Authors Plus Guest Author | |
*/ | |
add_filter( 'coauthors_guest_author_fields', 'capx_filter_guest_author_fields', 10, 2 ); | |
function capx_filter_guest_author_fields( $fields_to_return, $groups ) { | |
if ( in_array( 'all', $groups ) || in_array( 'contact-info', $groups ) ) { | |
$fields_to_return[] = array( | |
'key' => 'google_plus', | |
'label' => 'Google Plus', | |
'group' => 'contact-info', | |
); | |
} | |
return $fields_to_return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment