function wysiwyg_template_menu in Wysiwyg API template plugin 7.2
Implementation of hook_menu().
File
- ./
wysiwyg_template.module, line 12 - Makes TinyMCE Templates available as plugin for client-side editors integrated via Wysiwyg API.
Code
function wysiwyg_template_menu() {
$items = array();
// template overview settings page
$items['admin/config/content/wysiwyg-templates'] = array(
'title' => 'Wysiwyg templates',
'description' => 'Create and modify Wysiwyg templates',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'wysiwyg_template_overview',
),
'access arguments' => array(
'administer wysiwyg templates',
),
'file' => 'wysiwyg_template.admin.inc',
'weight' => 10,
);
// add template
$items['admin/config/content/wysiwyg-templates/add'] = array(
'title' => 'Add Template',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'wysiwyg_template_template_form',
),
'access arguments' => array(
'administer wysiwyg templates',
),
'type' => MENU_LOCAL_ACTION,
'file' => 'wysiwyg_template.admin.inc',
);
// import template
$items['admin/config/content/wysiwyg-templates/import'] = array(
'title' => 'Import Template',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'wysiwyg_template_import_form',
),
'access arguments' => array(
'import wysiwyg templates',
),
'type' => MENU_LOCAL_ACTION,
'file' => 'wysiwyg_template.admin.inc',
);
// edit template
$items['admin/config/content/wysiwyg-templates/%wysiwyg_template/edit'] = array(
'title' => 'Edit Template',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'wysiwyg_template_template_form',
4,
),
'access arguments' => array(
'administer wysiwyg templates',
),
'type' => MENU_CALLBACK,
'parent' => 'admin/config/content/wysiwyg-templates',
'file' => 'wysiwyg_template.admin.inc',
);
$items['admin/config/content/wysiwyg-templates/%wysiwyg_template/export'] = array(
'title' => 'Export Template',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'wysiwyg_template_export_form',
4,
),
'access arguments' => array(
'administer wysiwyg templates',
),
'type' => MENU_CALLBACK,
'parent' => 'admin/config/content/wysiwyg-templates',
'file' => 'wysiwyg_template.admin.inc',
);
//delete template
$items['admin/config/content/wysiwyg-templates/%wysiwyg_template/delete'] = array(
'title' => 'Delete Template',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'wysiwyg_template_delete_confirm',
4,
),
'access arguments' => array(
'administer wysiwyg templates',
),
'file' => 'wysiwyg_template.admin.inc',
'type' => MENU_CALLBACK,
);
// javascript template list
$items['wysiwyg-templates/%/%/list'] = array(
'page callback' => 'wysiwyg_template_list_js',
'page arguments' => array(
1,
2,
),
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
// individual template html - referenced by javascript above
$items['wysiwyg-templates/%/load/%wysiwyg_template_html'] = array(
'page callback' => 'wysiwyg_template_html_print',
'page arguments' => array(
3,
1,
),
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
return $items;
}