function linkit_profile_load_by_format in Linkit 7.3
Load the first profile assigned to a text format.
Parameters
$format: A string with the format machine name.
Return value
A LinkitProfile object or FALSE if no profile is found.
File
- ./
linkit.module, line 1170 - Main file for Linkit module.
Code
function linkit_profile_load_by_format($format) {
$profiles = linkit_profile_editor_load_all();
foreach ($profiles as $profile) {
if (is_array($profile->data['text_formats']) && in_array($format, array_filter($profile->data['text_formats']))) {
return $profile;
}
}
return FALSE;
}