This family of filters is used whenever the settings() theme function is called, to filter the value returned from the database before it is displayed.
The name of the particular filter that should be used is made by appending the name of the site setting to "display_setting_".
Usage
This filter always passes only one argument, the original value of the setting that will be printed.
- string
$setting
{{#if - | (optional)}}
- Original value of the setting.
- {{#if: | Default:
{{{default}}}
}}
Example
To print the site title, a theme writer would do the following:
<?php echo settings('site_title'); ?>
If you want to change the text that is displayed when the above code runs, you would use the filter "display_setting_site_title". For example, the following code would prepend "Omeka: " to the site title as printed on every page.
add_filter('display_setting_site_title', 'my_plugin_site_title'); function my_plugin_site_title($title) { return "Omeka: $title"; }
This filter can affect the display of any database option, as long as the theme is using the settings() function to retrieve the setting.