function fb_load in Drupal for Facebook 6.3
Same name and namespace in other branches
- 6.2 fb.module \fb_load()
- 7.4 fb.module \fb_load()
- 7.3 fb.module \fb_load()
Implementation of a %wildcard_load(). http://drupal.org/node/224170
Seems to get called a lot(!) so we cache.
File
- ./
fb.module, line 1299 - This is the core required module of Drupal for Facebook.
Code
function fb_load($id) {
static $cache;
if (!isset($cache)) {
$cache = array();
}
if (!isset($cache[$id])) {
$query = array(
'label' => $id,
);
if (fb_is_fb_admin_page()) {
// Show disabled apps to admins.
$query['status'] = 0;
// status >= 0
}
$cache[$id] = fb_get_app($query);
}
return $cache[$id];
}