function wysiwyg_template_load_template in Wysiwyg API template plugin 7.2
Wysiwyg template database load function
3 calls to wysiwyg_template_load_template()
- wysiwyg_template_features_export_render in ./
wysiwyg_template.features.inc - Implements hook_features_export_render().
- wysiwyg_template_html_load in ./
wysiwyg_template.module - Load a specific template for viewing, as called through the menu wildcard
- wysiwyg_template_load in ./
wysiwyg_template.module - Wysiwyg template Wildcard menu loader - prepare item for the create/modify admin form
File
- ./
wysiwyg_template.module, line 318 - Makes TinyMCE Templates available as plugin for client-side editors integrated via Wysiwyg API.
Code
function wysiwyg_template_load_template($name) {
$templateResults = db_query("SELECT * FROM {wysiwyg_templates} WHERE name = :name", array(
':name' => $name,
));
$template = $templateResults
->fetchObject();
$tItem = null;
if ($template != null) {
$tItem = array(
'title' => $template->title,
'description' => $template->description,
'weight' => $template->weight,
'fid' => $template->fid,
'body' => $template->body,
'format' => $template->format,
'name' => $name,
'content_types' => wysiwyg_template_load_template_content_types($name),
);
}
return $tItem;
}