function textimage_menu in Textimage 7.3
Same name and namespace in other branches
- 5.2 textimage.module \textimage_menu()
- 5 textimage.module \textimage_menu()
- 6.2 textimage.module \textimage_menu()
- 7.2 textimage.module \textimage_menu()
Implements hook_menu().
File
- ./
textimage.module, line 123 - Textimage - Provides text to image manipulations.
Code
function textimage_menu() {
$items = array();
$items['admin/config/media/textimage'] = array(
'title' => 'Textimage',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'textimage_form_settings',
),
'access arguments' => array(
'administer image styles',
),
'description' => 'Configure Textimage settings.',
'weight' => 10,
'type' => MENU_NORMAL_ITEM,
'file' => 'textimage.admin.inc',
);
$items['admin/config/media/textimage/cleanup'] = array(
'title' => 'Cleanup Textimage',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'textimage_flush_all_form',
),
'access arguments' => array(
'administer image styles',
),
'description' => 'Cleanup Textimage stored images.',
'type' => MENU_CALLBACK,
'file' => 'textimage.admin.inc',
);
// Generate image derivatives of publicly available files, via
// URL request path. For local default filesystem only.
$stream_wrapper = file_stream_wrapper_get_instance_by_scheme(variable_get('file_default_scheme', 'public'));
if ($stream_wrapper instanceof DrupalLocalStreamWrapper) {
$directory_path = $stream_wrapper
->getDirectoryPath();
$items[$directory_path . '/textimage'] = array(
'title' => 'URL textimage generation',
'page callback' => 'textimage_url_deliver',
'access arguments' => array(
'generate textimage url derivatives',
),
'type' => MENU_CALLBACK,
);
}
return $items;
}