You are here

function wysiwyg_load_profile in Wysiwyg 6

Same name and namespace in other branches
  1. 5 wysiwyg.module \wysiwyg_load_profile()

Load all profiles. Just load one profile if $name is passed in.

3 calls to wysiwyg_load_profile()
wysiwyg_admin in ./wysiwyg.admin.inc
Callback handler for admin pages; menu callback.
wysiwyg_get_profile in ./wysiwyg.module
Determine the profile to use for a given input format id.
wysiwyg_profile_overview in ./wysiwyg.admin.inc
Display overview of setup Wysiwyg Editor profiles; menu callback.

File

./wysiwyg.module, line 485
Integrate client-side editors with Drupal.

Code

function wysiwyg_load_profile($format = '') {
  static $profiles;
  if (!isset($profiles)) {
    $profiles = array();
    $result = db_query('SELECT * FROM {wysiwyg}');
    while ($profile = db_fetch_object($result)) {
      $profile->settings = unserialize($profile->settings);
      $profiles[$profile->format] = $profile;
    }
  }
  return $format && isset($profiles[$format]) ? $profiles[$format] : ($format ? FALSE : $profiles);
}