Home » Php » php – wp_insert_term converts the & character to &

php – wp_insert_term converts the & character to &

Posted by: admin February 25, 2020 Leave a comment

Questions:

How can I stop it from doing this filter/cleanse. I want an & to be stored in the DB and not &. Why should I have to decode it every time I get taxonomies from the DB.

        $result = $this->wpProxy->wp_insert_term($data['name'], $data['taxonomy'], [
            'description' => $data['description'],
            'slug' => $data['slug']
        ]);
How to&Answers: