You are here

function beautytips_manager_get_custom_tips in BeautyTips 6.2

Same name and namespace in other branches
  1. 8 beautytips_manager/beautytips_manager.module \beautytips_manager_get_custom_tips()
  2. 7.2 beautytips_manager.module \beautytips_manager_get_custom_tips()

Retrieve all custom beautytips.

2 calls to beautytips_manager_get_custom_tips()
beautytips_manager_init in ./beautytips_manager.module
Implementation of hook_init().
beautytips_manager_tips_manager_page in ./beautytips_manager.module
Listing of all beautytips available.

File

./beautytips_manager.module, line 399

Code

function beautytips_manager_get_custom_tips() {
  $cache = cache_get('beautytips:beautytips-ui-custom-tips');
  if (!$cache) {
    $tips = array();
    $results = db_query("SELECT * FROM {beautytips_manager}");
    while ($tip = db_fetch_object($results)) {
      $tips[] = $tip;
    }
    cache_set('beautytips:beautytips-ui-custom-tips', $tips);
  }
  else {
    $tips = $cache->data;
  }
  return $tips;
}