function imageapi_optimize_processor_definition_load in Image Optimize (or ImageAPI Optimize) 7.2
Loads the definition for an image processor.
The processor definition is a set of core properties for an image processor, not containing any user-settings. The definition defines various functions to call when configuring or executing an image processor. This loader is mostly for internal use within image.module. Use image_processor_load() or image_pipeline_load() to get image processors that contain configuration.
Parameters
$processor: The name of the processor definition to load.
$pipeline: An image pipeline array to which this processor will be added.
Return value
An array containing the image processor definition with the following keys:
- "processor": The unique name for the processor being performed. Usually prefixed with the name of the module providing the processor.
- "module": The module providing the processor.
- "help": A description of the processor.
- "function": The name of the function that will execute the processor.
- "form": (optional) The name of a function to configure the processor.
- "summary": (optional) The name of a theme function that will display a one-line summary of the processor. Does not include the "theme_" prefix.
4 calls to imageapi_optimize_processor_definition_load()
- imageapi_optimize_help in ./
imageapi_optimize.module - Implements hook_help().
- imageapi_optimize_pipelines in ./
imageapi_optimize.module - Gets an array of all pipelines and their settings.
- imageapi_optimize_pipeline_form_add_submit in ./
imageapi_optimize.admin.inc - Submit handler for adding a new image effect to an image pipeline.
- imageapi_optimize_processors in ./
imageapi_optimize.module - Loads all image processors from the database.
File
- ./
imageapi_optimize.module, line 593
Code
function imageapi_optimize_processor_definition_load($processor, $pipeline_name = NULL) {
$definitions = imageapi_optimize_processor_definitions();
// If a pipeline is specified, do not allow loading of default pipeline
// processors.
if (isset($pipeline_name)) {
$pipeline = imageapi_optimize_pipeline_load($pipeline_name, NULL);
if ($pipeline['storage'] == IMAGEAPI_OPTIMIZE_STORAGE_DEFAULT) {
return FALSE;
}
}
return isset($definitions[$processor]) ? $definitions[$processor] : FALSE;
}