Skip to content

Instantly share code, notes, and snippets.

@danielbachhuber
Created October 1, 2012 20:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielbachhuber/ece7e8bb1a97ac4a1977 to your computer and use it in GitHub Desktop.
Save danielbachhuber/ece7e8bb1a97ac4a1977 to your computer and use it in GitHub Desktop.
Adding a "Google Plus" profile field to Co-Authors Plus
<?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