-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMultisite-iframes.php
executable file
·38 lines (35 loc) · 1021 Bytes
/
Multisite-iframes.php
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
<?php
/*
* Plugin Name: Multisite iframes
* Plugin URI: https://github.com/KonainM/Multisite-iframes.git
* Description: This plugin enables site admins to use iframes in a WordPress multisite environment which, without this plugin, would only be possible by network admins.
* Version: 1.0
* Author: Konain Mukadam
* Author URI: https://github.com/KonainM/Multisite-iframes.git
*/
add_filter('wp_kses_allowed_html', 'multisite_iframes', 1, 2 );
function multisite_iframes($allowedposttags, $miframes) {
switch ( $miframes ) {
case 'post' :
$allowedposttags["iframe"] = array(
"allowfullscreen" => array(),
"frameborder" => array(),
"height" => array(),
"src" => array(),
"width" => array(),
"title" => array(),
"id" => array(),
"class" => array(),
"name" => array(),
"aria-label" => array(),
"aria-labelledby" => array(),
"role" => array(),
"srcdoc" => array(),
);
return $allowedposttags;
break;
default:
return $allowedposttags;
}
}
?>