90, 'name' => l10n('90° left')), array('value' => 270, 'name' => l10n('90° right')), array('value' => 180, 'name' => l10n('180°')) ); $template->assign(array( 'RI_PWG_TOKEN' => get_pwg_token(), 'angles' => $angles, 'angle_value' => 90, 'library' => pwg_image::get_library() )); $template->set_filename('rotate_image', realpath(dirname(__FILE__).'/rotate_image.tpl')); $template->append('element_set_global_plugins_actions', array( 'ID' => 'rotateImg', 'NAME' => l10n('Rotate images'), 'CONTENT' => $template->parse('rotate_image', true)) ); } function rotate_image_element_action($action, $collection) { global $template; if ($action == 'rotateImg') { //flush thumbnails links by regenerating ramdom ids to uris $template->delete_compiled_templates(); } } ?>