You are here

function wysiwyg_profile_load in Wysiwyg 7.2

Same name and namespace in other branches
  1. 5.2 wysiwyg.module \wysiwyg_profile_load()
  2. 6.2 wysiwyg.module \wysiwyg_profile_load()

Loads a profile for a given text format.

Since there are commonly not many text formats, and each text format-enabled form element will possibly have to load every single profile, all existing profiles are loaded and cached once to reduce the amount of database queries.

Parameters

$format: The machine-name of a text format.

Return value

A profile if found, else FALSE.

3 calls to wysiwyg_profile_load()
wysiwyg_get_profile in ./wysiwyg.module
Determine the profile to use for a given input format id.
wysiwyg_profile_break_lock_confirm_submit in ./wysiwyg.admin.inc
Submit handler to break_lock a profile.
wysiwyg_ui_profile_cache_load in ./wysiwyg.module
Specialized menu callback to load a profile and check its locked status.

File

./wysiwyg.module, line 837

Code

function wysiwyg_profile_load($format) {
  $profiles = wysiwyg_profile_load_all();
  return isset($profiles[$format]) ? $profiles[$format] : FALSE;
}