d12-moodle-shortcodes/filter.php

12 lines
251 B
PHP
Raw Normal View History

2017-12-19 02:12:29 +00:00
<?php
class filter_d12shortcodes extends moodle_text_filter {
public function filter($text, array $options = array()) {
return str_replace(
array('[wi]', '[/wi]'),
array('<div class="wi">', '</div>'),
$text
);
}
}