moodle-expcontent/classes/shortcodes.php

25 lines
528 B
PHP
Raw Normal View History

<?php
namespace mod_expcontent;
defined('MOODLE_INTERNAL') || die();
2022-09-07 14:02:59 +00:00
require_once(__DIR__ . "/../lib.php");
class shortcodes {
public static function expcontent($shortcode, $args) {
$expconfig = get_config('mod_expcontent');
$baseurl = $expconfig->baseurl;
2022-09-07 14:02:59 +00:00
if ($baseurl[-1] != "/") $baseurl += "/";
2022-09-07 14:02:59 +00:00
$domain = trim(array_key_first($args));
$content = trim(array_key_last($args));
2022-09-07 14:02:59 +00:00
return $baseurl . "assets/domain/" . $domain . "/meta_media/high/" . $content;
}
2022-09-07 14:02:59 +00:00
}