You are here

function follow_networks_load in Follow 5

Same name and namespace in other branches
  1. 6 follow.module \follow_networks_load()
  2. 7.2 follow.inc \follow_networks_load()
  3. 7 follow.module \follow_networks_load()

Loads all follow networks

Parameters

$reset: Boolean. If TRUE, flushes the follow networks cache.

Return value

An array of network names, keys are machine names, values are visible titles.

2 calls to follow_networks_load()
follow_links_form in ./follow.module
The form for editing follow links.
_follow_block_content in ./follow.module
Helper function to build the block content display.

File

./follow.module, line 638
Allows users to add links to their social network profiles.

Code

function follow_networks_load($uid, $reset = FALSE) {
  static $networks = array();

  // Clear cache if $reset is TRUE;
  if ($reset) {
    $networks = array();
  }

  // Return presets if the array is populated.
  if (empty($networks[$uid])) {

    // We call hook_follow_networks_alter() to allow other modules to create
    // or alter networks.
    $networks[$uid] = follow_default_networks($uid);
    module_invoke_all('follow_networks_alter', $networks);
  }
  return $networks[$uid];
}