Plugin modules' filter api

Plugin modules' filter api

- Itamar Tzadok の投稿
返信数: 2
Could someone please clarify how the new filter api is supposed to work for filters in contributed module plugins? (see upgrade note below for reference)
 
Surely filters of contributed modules are not expected to relocate to /filter/xxxx. Would mod/my_module/filter.php continue to work in 2.3? But then shouldn't filters of contributed modules be subplugins of the module for consistency and flexibility (ie mod/my_module/filter/xxxx) ?
 
笑顔

=== 2.2 ===

 
* legacy filters and legacy locations have been deprecated, so any
  old filter should be updated to use the new moodle_text_filter,
  and any filter bundled under mod/xxxx directories be moved to
  /filter/xxxx (MDL-29995). They will stop working completely in
  Moodle 2.3 (MDL-29996). See the glossary or data filters for
  examples of legacy module filters and locations already updated.
Itamar Tzadok への返信

Re: Plugin modules' filter api

- Tim Hunt の投稿
画像 Core developers 画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers

Moving your filter code into /filter is exactly what you are expected to do. Note that there is now a filter/glossary in moodle 2.2.

You can use the $plugin->dependencies part of http://docs.moodle.org/dev/version.php to declare that the filter requires the mod to be installed.