Closed herbdool closed 5 years ago
I think it's as simple as removing the last two parameters:
/**
* Options for the Footnotes filter.
*
* This has currently 1 setting, the feature to collapse together footnotes
* with identical content is an option.
*/
function _footnotes_settings($form, &$form_state, $filter, $format) {
$settings['footnotes_collapse'] = array(
'#type' => 'checkbox',
'#title' => t('Collapse footnotes with identical content'),
'#default_value' => $filter->settings['footnotes_collapse'],
'#description' => t('If two footnotes have the exact same content, they will be collapsed into one as if using the same value="" attribute.'),
);
return $settings;
}
Thanks for the report! Now I remember that I got these errors as well but forgot to file an issue. I'll test your suggestion.
I've tested the code above, and errors went away. Will file a PR.
Filed and merged the PR, thank you again @herbdool!
After first installing, I go to
/admin/config/content/formats/filtered_html
and get these errors:Warning: Missing argument 5 for _footnotes_settings(), called in /app/core/modules/filter/filter.admin.inc on line 347 and defined in _footnotes_settings() (line 49 of /app/modules/footnotes/footnotes.module).
Warning: Missing argument 6 for _footnotes_settings(), called in /app/core/modules/filter/filter.admin.inc on line 347 and defined in _footnotes_settings() (line 49 of /app/modules/footnotes/footnotes.module).
There's a new format for the function: https://api.backdropcms.org/api/backdrop/core%21modules%21filter%21filter.api.php/function/callback_filter_settings/1