Questions tagged «wp-kses»

1
如何在不剥离iframe代码的情况下获取SimplePie fetch_feed?
我在插件中抓取了一个远程供稿,有些条目包含我要保留的iframe代码。但是,SimplePie fetch_feed一直将其剥离。这是我的代码以及我已经尝试过的内容: kses_remove_filters(); # remove kses filters but SimplePie strips codes anyway $rss = fetch_feed( 'http://www.someblog.com/feed/' ); $rss_items = $rss->get_items( 0, 2 ); # get two entries for this example foreach ( $rss_items as $item ) { # just dump to screen: echo "<div id='message' class='updated'><p>" . $item->get_content() . "</p></div>"; …
10 rss  feed  wp-kses  iframe 

6
典型的wp_kses $ allow
我有一个自定义帖子文本框,我想wp_kses在更新帖子元之前对其进行清理。 我一直在寻找通用$allowed设置的示例,但我只看到了以下示例: $allowed = array( 'a' => array( // on allow a tags 'href' => array() // and those anchors can only have href attribute ) ); 什么是典型wp_kses $allowed设置?有人可以提供他们通常过滤的示例吗?
9 wp-kses 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.