You are here

function wysiwyg_get_profile in Wysiwyg 5

Same name and namespace in other branches
  1. 5.2 wysiwyg.module \wysiwyg_get_profile()
  2. 6.2 wysiwyg.module \wysiwyg_get_profile()
  3. 6 wysiwyg.module \wysiwyg_get_profile()
  4. 7.2 wysiwyg.module \wysiwyg_get_profile()

Determine the profile to use for a given input format id.

This function also performs sanity checks for the configured editor in a profile to ensure that we do not load a malformed editor.

Parameters

$format: The internal id of an input format.

Return value

A wysiwyg profile.

See also

wysiwyg_load_editor(), wysiwyg_get_editor()

1 call to wysiwyg_get_profile()
wysiwyg_process_form in ./wysiwyg.module
Process a textarea for Wysiwyg Editor.

File

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

Code

function wysiwyg_get_profile($format) {
  if ($profile = wysiwyg_load_profile($format)) {
    if (wysiwyg_load_editor($profile)) {
      return $profile;
    }
  }
  return FALSE;
}