You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
39 lines
1.3 KiB
<?php
|
|
// This file is part of Moodle-oembed-Filter
|
|
//
|
|
// Moodle-oembed-Filter is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// Moodle-oembed-Filter is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Moodle-oembed-Filter. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
/**
|
|
* Filter for component 'filter_oembed'
|
|
*
|
|
* @package filter_oembed
|
|
* @copyright 2012 Matthew Cannings; modified 2015 by Microsoft, Inc.
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
* code based on the following filters...
|
|
* Screencast (Mark Schall)
|
|
* Soundcloud (Troy Williams)
|
|
*/
|
|
|
|
defined('MOODLE_INTERNAL') || die();
|
|
|
|
use filter_oembed\service\oembed;
|
|
/**
|
|
* Installs the OEmbed filter.
|
|
*/
|
|
function xmldb_filter_oembed_install() {
|
|
filter_set_global_state('filter/oembed', TEXTFILTER_ON);
|
|
|
|
// Insert the initial data elements from the instance's providers.
|
|
oembed::update_provider_data();
|
|
}
|