How can I properly sanitize the update_option in WordPress?

Question

I am using this part of the code in my WordPress plugin to update the option.

update_option('button_loc_shop_page', $_POST['button_loc_shop_page']);

I want to sanitize this. How can I properly sanitize it? Any comments or pointers would be really appreciated.

0
Rajin Sharwar 3 weeks 2022-11-05T03:07:00-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse