function theme_imageapi_optimize_pipeline_usage in Image Optimize (or ImageAPI Optimize) 7.2
Returns HTML for the page containing the list of image pipelines.
Parameters
$variables: An associative array containing:
- pipelines: An array of all the image pipelines returned by image_get_pipelines().
See also
image_get_pipelines()
1 theme call to theme_imageapi_optimize_pipeline_usage()
- imageapi_optimize_pipeline_usage_list in ./
imageapi_optimize.admin.inc - Menu callback; Listing of all current image pipeline usage.
File
- ./
imageapi_optimize.admin.inc, line 604
Code
function theme_imageapi_optimize_pipeline_usage($variables) {
$usages = $variables['usages'];
$header = array(
t('Style name'),
t('Pipeline'),
array(
'data' => t('Operations'),
'colspan' => 1,
),
);
$rows = array();
foreach ($usages as $usage) {
$row = array();
$row[] = l($usage['label'], 'admin/config/media/image-styles/edit/' . $usage['name']);
if (isset($usage['pipeline_name'])) {
$row[] = l($usage['pipeline_label'], 'admin/config/media/imageapi-optimize/edit/' . $usage['pipeline_name']);
}
else {
$row[] = '';
}
$link_attributes = array(
'attributes' => array(
'class' => array(
'image-style-link',
),
),
);
$row[] = l(t('edit'), 'admin/config/media/image-styles/edit/' . $usage['name'], $link_attributes);
$rows[] = $row;
}
if (empty($rows)) {
$rows[] = array(
array(
'colspan' => 3,
'data' => t('There are currently no image styles. <a href="!url">Add a new one</a>.', array(
'!url' => url('admin/config/media/image-style/add'),
)),
),
);
}
return theme('table', array(
'header' => $header,
'rows' => $rows,
'caption' => $variables['description'],
));
}