file_markup_options

New in version 2.7.

Usage

Modify the options passed to file_markup

Unlike the file_markup filter, this filter allows you to change options that Omeka uses when rendering HTML for a file, meaning you can alter the output without having to write completely new markup yourself.

Value

array $options

Array of options for file_markup

Arguments

File file

The file object

Examples

Add target="_blank" to all links to original files:

class MyPlugin extends :php:class:`Omeka_Plugin_AbstractPlugin`
{
    protected $_filters = array('file_markup_options');

    public filterFileMarkupOptions($options, $args)
    {
        $options['linkAttributes']['target'] = '_blank';
        return $options;
    }
}

See Also

file_markup documentation for a list of possible options