Quantcast
Channel: プラグイン検証用-FTPup
Viewing all articles
Browse latest Browse all 88

管理者以外のユーザーが更新するとき特定のタグが消える

$
0
0

iframeなどが消えるらしい。それ以外はよくわからない。

原因は「unfiltered_html(フィルタなしのHTML)」権限が付与されていないため。

functions.phpに追記

/*
 * 特定のタグを許可する
 */
function test_save_pre($content){
    global $allowedposttags;
    $allowedposttags['iframe'] = array(
        'class' => array () ,
        'src'=> array() ,
        'width'=> array(),
        'height'=> array() ,
        'frameborder' => array() ,
        'scrolling'=> array()
    );
    return $content;
}
add_filter('content_save_pre','test_save_pre');

 または、プラグイン「User Role Editor」などで上記の権限を与えるなど。


Viewing all articles
Browse latest Browse all 88

Trending Articles