-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshortcode_handler.inc
More file actions
41 lines (38 loc) · 911 Bytes
/
shortcode_handler.inc
File metadata and controls
41 lines (38 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* Handler for shortcode spreaker
*
* @package BardCanvas
* @subpackage spreaker_shortcode
* @author https://www.spreaker.com - Ported by Alejandro Caballero - lava.caballero@gmail.com
*
* Trailing globals:
* @var module[] $modules
* @var module $current_module Topmost module
* @var module $this_module Self
* @var config $config
* @var settings $settings
* @var account $account
*
* Trailing vars:
* @var string $matched_str
* @var string $contents
* @var array $attributes
*
* Expected attributes:
* • type
* • resource
* • theme
* • autoplay
* • playlist
* • width
* • height
*/
use hng2_base\account;
use hng2_base\config;
use hng2_base\module;
use hng2_base\settings;
include_once __DIR__ . "/functions.inc";
$res = process_spreaker_shortcode($attributes);
$contents = str_replace($matched_str, $res, $contents);
return;