1 This file describes API changes in core filter API and plugins,
2 information provided here is intended especially for developers.
6 * Although there is no API change that require you to update your filter,
7 if you use the filter_phrases() helper method, you may wish to take
8 advantage of the changes that were made in MDL-63403 to improve performance.
10 Now, instead of having to compute the replacement HTML for each phrase before
11 you construct the filterobject for it. You can instead pass a callback to
12 the filterobject constructor which is only called if the phrase is used.
14 To understand how to use this, see the comment on filterobject::__construct and
15 look at the filter_glossary changes as an example:
16 https://github.com/timhunt/moodle/commit/86543cb1db35e35c98b6503c4ead3cf0fed4a584
20 * New argument $skipfilters to filter_manager::filter_text to allow applying
21 the filters with a given one omitted.
23 * New admin setting class admin_setting_filter_types which can be used if you
24 want to make the disablefilters value in your code configurable.
26 * Methods filter_manager::text_filtering_hash and moodle_text_filter::hash have been
27 deprecated. There were use by the old Moodle filtered text caching system
28 that was removed several releases ago.
32 * Finally filter may use $PAGE and $OUTPUT, yay!
33 * Old global text caching was removed, each filter is now responsible
38 * filtersettings.php is now deprecated, migrate to standard settings.php
42 * legacy_filter emulation was removed
43 * support for 'mod/*' filters was removed
44 * use short filter name instead of old path, ex.: 'filter/tex' ---> 'tex'
45 in all filter API functions and methods
49 * new setup() method added to moodle_text_filter, invoked before
50 filtering happens, used to add all the requirements to the page
51 (js, css...) and/or other init tasks. See filter/glossary for
52 an example using the API (and MDL-32279 for its justification).
56 * legacy filters and legacy locations have been deprecated, so any
57 old filter should be updated to use the new moodle_text_filter,
58 and any filter bundled under mod/xxxx directories be moved to
59 /filter/xxxx (MDL-29995). They will stop working completely in
60 Moodle 2.3 (MDL-29996). See the glossary or data filters for
61 examples of legacy module filters and locations already updated.