2021-08-19 09:37:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace mod_expcontent;
|
|
|
|
|
|
|
|
defined('MOODLE_INTERNAL') || die();
|
|
|
|
|
2022-09-07 14:02:59 +00:00
|
|
|
require_once(__DIR__ . "/../lib.php");
|
2021-08-19 09:37:47 +00:00
|
|
|
|
|
|
|
class shortcodes {
|
|
|
|
|
|
|
|
public static function expcontent($shortcode, $args) {
|
|
|
|
$expconfig = get_config('mod_expcontent');
|
|
|
|
$baseurl = $expconfig->baseurl;
|
2022-09-07 14:02:59 +00:00
|
|
|
|
2021-08-19 09:37:47 +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));
|
2021-08-19 09:37:47 +00:00
|
|
|
|
2022-09-07 14:02:59 +00:00
|
|
|
return $baseurl . "assets/domain/" . $domain . "/meta_media/high/" . $content;
|
2021-08-19 09:37:47 +00:00
|
|
|
}
|
|
|
|
|
2022-09-07 14:02:59 +00:00
|
|
|
}
|
|
|
|
|