function minifyjs_minify_file_operation in Minify JS 7
Helper function for batch, minify file operation.
1 string reference to 'minifyjs_minify_file_operation'
- minifyjs_manage_javascript_files_form_submit in ./
minifyjs.admin.inc - Helper function for form table (form submit):
File
- ./
minifyjs.admin.inc, line 139 - Hook and helper functions for the Minify JS module.
Code
function minifyjs_minify_file_operation($fid, &$context) {
// Set the context message
$files = minifyjs_load_all_files();
$file = $files[$fid];
$context['message'] = t('Minifying file - %file', array(
'%file' => $file->uri,
));
// Perform the minify
$result = minifyjs_minify_file($fid);
if ($result === TRUE) {
$context['results']['success'][] = t('File %file was minified successfully.', array(
'%file' => $file->uri,
));
}
else {
$context['results']['errors'][] = $result;
}
}