Why wp_kses() not working for rel, target of link in WordPress

Question

I am using below code for wp_kses(). But it’s ignoring rel & target in the result. I want to show rel=”nofolow” target=”_blank” in my result (link).

$allowed_tags= array(
                        'br' => array(),
                        'p' => array(),
                        'a'  => array(
                                'href'     => true,
                                'rel'      => true,
                                'target'   => true,                             
                            ),
                );
0
Aminul 2 years 2019-11-25T05:48:57-05:00 0 Answers 84 views 0

Leave an answer

Browse
Browse