follow.api.php 647 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Alter the available networks to the Follow module.
  4. *
  5. * @param $networks
  6. * Associative array of networks that are available.
  7. * @param $uid
  8. * The User ID of the networks to be displayed. If 0 is provided, will be the
  9. * networks for the website rather then an individual user.
  10. */
  11. function hook_follow_networks_alter(&$networks, $uid = 0) {
  12. // Add a network.
  13. $networks['mailinglist'] = array(
  14. 'title' => t('Mailing List'),
  15. 'domain' => '',
  16. );
  17. // Replace Twitter with Identi.ca
  18. unset($networks['twitter']);
  19. $networks['identica'] = array(
  20. 'title' => t('Identi.ca'),
  21. 'domain' => 'identi.ca',
  22. );
  23. }