I’m not completely sure what you mean to do, but are you looking for sanitize_text_field
?
$array = array_map( 'sanitize_text_field', $array );
Related Posts:
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- How to properly validate data from $_GET or $_REQUEST using WordPress functions?
- What is the difference between esc_html and wp_filter_nohtml_kses?
- What is the difference between strip_tags and wp_filter_nohtml_kses?
- array_map() for sanitizing $_POST
- Is there a faster way than wp_insert_post to add content to a blog
- Coding a plugin on WordPress; when should I sanitize? [duplicate]
- How to sanitize user input?
- Use wp_set_post_terms() instead of wp_insert_post()
- update post meta for checkbox in the admin when inserted in the front-end
- Set page template programaticlly in plugin
- WP_Editor – Saving Value into Plugin Option – Stripping HTML
- Prevent invalid or empty values from being saved to the database and retain the form field values upon error
- wordpress is adding a second backslash when I use addslashes
- Remove all removed pages from wordpress
- How to get custom post_author?
- Multiple array for post_content on plugin activation
- Plugin to create Posts and Forums then choose category and parent forum
- Creating posts with links from a txt file
- Using wp_mail to send email?
- How to show comments from different Plugins to same post type?
- How to check if `comment_meta` exists before inserting the comment?
- How to get the `comment_post_ID`?
- Posts form with AJAX request – Plugin development
- Custom plugin foreach wp_insert_post not working
- How to prevent wp_insert_post from creating a new post every second?
- do I need to sanitize a shortcode’s function input?
- Array/List Edit in Backend
- Getting duplicate page when activating my plugin
- Add Page With Parent ID
- Yet another wp_insert_post infinite loop. What is wrong?
- oneOf two possible objects in WP REST API?
- Sanitize and Save metabox values
- esc_url, esc_url_raw or sanitize_url?
- What’s the best method for emptying an option created with the Settings API?
- template_include (overriding default plugin templates via current theme)
- Using composer for dependency management in plugindevelopment
- What is nonce and how to use it with Ajax in WordPress? [duplicate]
- Update exisiting site to 3.5 release candidate
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- add_filter and remove_filter added before and after wp_query
- How can I hook into existing WordPress Bulk actions?
- creating elements/innerblocks via rangecontrol
- How to check if current static page is frontpage from admin plugin
- Woocommerce add custom button to backend order table
- Earliest WP Hook to Safely and Reliably Redirect
- What is rich_editing?
- How can I display an error message after post has been saved?
- What method to use to call a REST API?
- Is it possible to delay execution of shortcode output callback?
- Why my database table not created on activation?
- Resizing Images for a Gallery-Plugin?
- Which themes do you use to test compatibilities with your plugin [closed]
- How to debug a unit test for a WordPress plugin, which uses wordpress-test?
- Is there any way to allow a plugin to write over a previous version?
- How do i validate data entered in a meta box so that only floats can be entered in a field?
- Adding functions to hooks from within a class
- What filters to call to modify the output of the entire page?
- Tried in different ways but sidebar not working?
- How to Create a Simple Related Posts Plugin
- Help With Rewrite_Rules For a Custom Plug-In
- Theme Install using a Custom Repository
- How to add plugin version update option in plugin row action?
- Activate User in Code (BuddyPress+bbpress)
- wp_filesystem put_contents issue with owner/group
- error ‘The package could not be installed. No valid plugins were found.’
- Search: how to extend the existing search to include a custom table
- Plugin development: delete options when updating to a new version
- Custom code for WordPress dynamic menu
- Gutenberg table block with Bootstrap .table class
- Translate MCE button text/tooltip in custom plugin
- Can’t change the style of a submit input type? [closed]
- How to get all queries’s results after they have executed?
- How can I create a custom plugin that allows anonymous users to signup without registering?
- why update option is not working?
- WP: Search and replace in DB programmatically
- How to silent ‘Attempting a database schema change is discouraged.’?
- How add default term meta to prevent an error?
- Get images / media attached to a page by page ID
- How to create two custom post types when plugin is activated?
- Plugin admin page stylesheet doesn’t work
- Why is $_POST empty when saving custom Meta Box?
- Wp_List_Table is showing as no class found named wp list table
- 403 error rest_’cookie_invalid_nonce’ on API Request
- Insert, update or remove data from database (usermeta)
- Load script on frontend from widget plugin
- Can’t get wpColorPicker to work in a widget
- WordPress Plugin Update Process
- Ajax functionality not being called under wordpress plugin
- Registration form Plugin… Email confirmation
- Add a description/hint field in the admin page of a plugin
- Can’t add images in wordpress to my page – button isn’t clickable
- Gutenberg and custom blocks messed up pagespeed score. What did I wrong?
- Gutenberg text field validation
- I don’t understand how symlinks in plugin work
- Undo operation not working in Rich text [Gutenberg]
- Is there a canonical way for a plugin to install a mu-plugin or drop-in?
- How can create a custom plugin to call my webapi after any registration or membership plugin functionality
- Reinitiate Gutenburg’s blocks using javascript
- Generating Multiple Divi Pages from Database