I'm looking for a way to programmatically change the settings of an input filter and activate it in Drupal 7. Let's take the Footnotes module as an example: It adds a new input filter that can be activated on input formats. I can navigate to admin/config/content/formats/2
to edit my "Full HTML" input format and there activate the Footnote filter and configure it. But how can I achieve that programmatically?
My first guess was to load the input format using filter_format_load(), change some values and then do a filter_format_save(). But in the object that I get from filter_format_load(), there are no input filters, i.e. $format->filters
doesn't exist.
I can get all available filters using filter_list_format() and I believe I could change some values there. But then again, I can't find a way to save those settings.