douhao2153 2017-05-04 14:33
浏览 44

wp_kses启用特定标记的所有属性

I'm using wp_kses to render a string containing an img tag, but it has some dynamic attributes also, I know I can define tag with attributes like this

                       echo wp_kses( $img_tag_string, array(
                            'img' => array(
                                'src' => array(),
                                'class' => array(),
                                'alt' => array(),
                                'title' => array(),
                            ),
                        ) );

But there are some other attributes also like width, height. Is there any way I can define just img tag and it can contain any attributes?

  • 写回答

0条回答 默认 最新

    报告相同问题?