Skip to content

Instantly share code, notes, and snippets.

@kurozumi

kurozumi/functions.php

Last active Oct 6, 2015
Embed
What would you like to do?
【ワードプレス】投稿できるHTMLタグ(iframeなど)を追加する方法
<?php
add_filter("wp_kses_allowed_html", function($allowedposttags, $context){
if($context != "post")
return $allowedposttags;
return array_merge($allowedposttags, array(
'iframe' => array(
'width' => true,
'height' => true,
'src' => true,
'frameborder' => true,
'allowfullscreen' => true
);
));
}, 99, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment