function wysiwyg_profile_load_all in Wysiwyg 6.2
Same name and namespace in other branches
- 5.2 wysiwyg.module \wysiwyg_profile_load_all()
- 7.2 wysiwyg.module \wysiwyg_profile_load_all()
Load all profiles.
Return value
An array of profiles keyed by format name.
3 calls to wysiwyg_profile_load_all()
- wysiwyg_profile_cache_clear in ./
wysiwyg.module - Clear all Wysiwyg profile caches.
- wysiwyg_profile_overview in ./
wysiwyg.admin.inc - Display overview of setup Wysiwyg Editor profiles; menu callback.
- wysiwyg_user in ./
wysiwyg.module - Implementation of hook_user().
File
- ./
wysiwyg.module, line 740 - Integrates client-side editors with Drupal.
Code
function wysiwyg_profile_load_all($reset = FALSE) {
static $profiles;
if ($reset) {
$profiles = NULL;
}
if (!isset($profiles)) {
$profiles = array();
$result = db_query('SELECT format, editor, settings FROM {wysiwyg}');
while ($profile = db_fetch_object($result)) {
$profile->settings = unserialize($profile->settings);
$profile->preferences = $profile->settings['_profile_preferences'];
unset($profile->settings['_profile_preferences']);
$profile->name = 'format' . $profile->format;
$profiles[$profile->format] = $profile;
}
}
return $profiles;
}