1 |
efrain |
1 |
This file describes API changes in core filter API and plugins,
|
|
|
2 |
information provided here is intended especially for developers.
|
|
|
3 |
|
|
|
4 |
=== 4.3 ===
|
|
|
5 |
|
|
|
6 |
* Filters can be applied at different stages - before text format conversion, before text cleaning or after text cleaning.
|
|
|
7 |
It is recommended that add-on filter developers use early formatting stages to prevent security issues caused by
|
|
|
8 |
modification of already sanitised text.
|
|
|
9 |
|
|
|
10 |
* The moodle-filter_mathjaxloader-loader yui module has been deprecated. We create amd filter_mathjaxloader/loader to replace it.
|
|
|
11 |
|
|
|
12 |
=== 4.0 ===
|
|
|
13 |
|
|
|
14 |
* The Word censorship (filter_censor) filter has been completely removed from core. It has been moved to the plugins database
|
|
|
15 |
repository, so it can still be installed as a third-party plugin.
|
|
|
16 |
|
|
|
17 |
=== 3.9 ===
|
|
|
18 |
|
|
|
19 |
* The following functions, previously used (exclusively) by upgrade steps are not available anymore because of the upgrade cleanup performed for this version. See MDL-65809 for more info:
|
|
|
20 |
- filter_mathjaxloader_upgrade_cdn_cloudflare()
|
|
|
21 |
- filter_mathjaxloader_upgrade_mathjaxconfig_equal()
|
|
|
22 |
|
|
|
23 |
=== 3.6 ===
|
|
|
24 |
|
|
|
25 |
* Although there is no API change that require you to update your filter,
|
|
|
26 |
if you use the filter_phrases() helper method, you may wish to take
|
|
|
27 |
advantage of the changes that were made in MDL-47962 to improve performance.
|
|
|
28 |
|
|
|
29 |
Now, instead of having to compute the replacement HTML for each phrase before
|
|
|
30 |
you construct the filterobject for it. You can instead pass a callback to
|
|
|
31 |
the filterobject constructor which is only called if the phrase is used.
|
|
|
32 |
|
|
|
33 |
To understand how to use this, see the comment on filterobject::__construct and
|
|
|
34 |
look at the filter_glossary changes as an example:
|
|
|
35 |
https://github.com/moodle/moodle/commit/5a8c44d000ecc5669db26aefebe447f688e8f2ce
|
|
|
36 |
|
|
|
37 |
=== 3.0 ===
|
|
|
38 |
|
|
|
39 |
* New argument $skipfilters to filter_manager::filter_text to allow applying
|
|
|
40 |
the filters with a given one omitted.
|
|
|
41 |
|
|
|
42 |
* New admin setting class admin_setting_filter_types which can be used if you
|
|
|
43 |
want to make the disablefilters value in your code configurable.
|
|
|
44 |
|
|
|
45 |
* Methods filter_manager::text_filtering_hash and moodle_text_filter::hash have been
|
|
|
46 |
deprecated. There were use by the old Moodle filtered text caching system
|
|
|
47 |
that was removed several releases ago.
|
|
|
48 |
|
|
|
49 |
=== 2.7 ===
|
|
|
50 |
|
|
|
51 |
* Finally filter may use $PAGE and $OUTPUT, yay!
|
|
|
52 |
* Old global text caching was removed, each filter is now responsible
|
|
|
53 |
for own caching.
|
|
|
54 |
|
|
|
55 |
=== 2.6 ===
|
|
|
56 |
|
|
|
57 |
* filtersettings.php is now deprecated, migrate to standard settings.php
|
|
|
58 |
|
|
|
59 |
=== 2.5 ===
|
|
|
60 |
|
|
|
61 |
* legacy_filter emulation was removed
|
|
|
62 |
* support for 'mod/*' filters was removed
|
|
|
63 |
* use short filter name instead of old path, ex.: 'filter/tex' ---> 'tex'
|
|
|
64 |
in all filter API functions and methods
|
|
|
65 |
|
|
|
66 |
=== 2.3 ===
|
|
|
67 |
|
|
|
68 |
* new setup() method added to moodle_text_filter, invoked before
|
|
|
69 |
filtering happens, used to add all the requirements to the page
|
|
|
70 |
(js, css...) and/or other init tasks. See filter/glossary for
|
|
|
71 |
an example using the API (and MDL-32279 for its justification).
|
|
|
72 |
|
|
|
73 |
=== 2.2 ===
|
|
|
74 |
|
|
|
75 |
* legacy filters and legacy locations have been deprecated, so any
|
|
|
76 |
old filter should be updated to use the new moodle_text_filter,
|
|
|
77 |
and any filter bundled under mod/xxxx directories be moved to
|
|
|
78 |
/filter/xxxx (MDL-29995). They will stop working completely in
|
|
|
79 |
Moodle 2.3 (MDL-29996). See the glossary or data filters for
|
|
|
80 |
examples of legacy module filters and locations already updated.
|