- Moodle 1.9 Extension Development
- Jonathan Moore Michael Churchward
- 177字
- 2021-08-06 17:24:07
How a filter works
Before trying to build a filter, it would help to understand how it works. To begin with, any text written to the screen in Moodle should be processed through the format_text
function. The purpose of this function is to process the text, such that it is always safe to be displayed. This means making sure there are no security issues and that any HTML used contains only allowed tags.
Additionally, the output is run through the filter_text
function, and this is the function we are interested in. This function takes the text destined for the screen, and applies all enabled filters to it. The resulting text will be the result of all of these filters.
filter_text
applies each enabled filter to the text in the order defined in the filter configuration screen (shown in the following screenshot). The order is important; each filter will be fed the output of the previous filter's text. So it is always possible that one filter may change the text in a way that impacts the next filter.

- Joomla! 1.5 SEO
- Illustrator CS6核心應(yīng)用案例教程(全彩慕課版)
- FreeSWITCH 1.0.6
- Microsoft SharePoint 2010 Administration Cookbook
- Authorware應(yīng)用案例教程
- 斯科特·凱爾比的零基礎(chǔ)攝影后期課 Lightroom數(shù)碼照片調(diào)修技法
- Photoshop CS6實戰(zhàn)基礎(chǔ)培訓(xùn)教程(全視頻微課版)
- Maya 2020基礎(chǔ)教材
- 修片有道:PHOTOSHOP攝影后期專業(yè)技法
- 構(gòu)筑敏捷的開發(fā)團(tuán)隊:微軟Visual Studio 2010實戰(zhàn)兵法
- Instant Apache Sqoop
- 從零開始:Photoshop CC 2019設(shè)計基礎(chǔ)+商業(yè)設(shè)計實戰(zhàn)
- Creo 4.0中文版基礎(chǔ)教程
- 剪輯師寶典:視頻剪輯思維與案例實戰(zhàn)
- 同花順軟件操作技巧與實戰(zhàn)指南