Try $name = trim( sanitize_user( $_POST['name'], true ) );
Be sure that the function does what you want! Read here
Related Posts:
- What are the common security flaws I need to look for? [closed]
- Making my plugin multi-site compatible
- Creating 20,000 Posts or Pages using a .csv file?
- What’s the easiest way to duplicate an entire navigation menu?
- Updating WooCommerce variable product stock issue
- How can I get a list of plugins and which blogs are using them?
- What is the easiest way to implement cascading database upgrade for my plugin?
- Plugin Development sqlite or WordPress’ database
- Retrieving a Value from a wp-database
- Problem with creating tables for Plugin
- Prevent duplicate records in plugin table
- WordPress WPforms customization
- How do I run SQL queries on a WordPress web page? [closed]
- Migrating to WordPress Recipe Plugin and Some SQL Issues
- How to create multiple database tables on plugin activation?
- Does deleting a Plugin via the WordPress admin ‘completely’ remove the code?
- Speeding SQL queries for a large database?
- correct validate and sql query
- correct sql query
- SQL query, error
- $wpdb update query in plugin only updating one column
- Woocommerce Backend Search by Title and SKU
- problem with sql query
- Deactivation Hook does not remove database
- Using AJAX to run SQL statement and populate dropdown
- Adding CASE in WP_Query
- JOIN and SUM different statement results (Mailster Database)
- How to get specific column data conditionally in database in WordPress?
- Memcaching recurring SQL Queries
- add products to WordPress site automatically
- How to get database connection details without longing to cpanel in WordPress?
- Performing CRUD operations on front end in wordpress
- Display a number value from mysql query in WP
- Looping the data from WordPress database using foreach
- How To Toggle User_Meta in frontend in a form using PHP
- Get and Update Most Meta Value as an array in HTML form
- WordPress filter from custom table is not working properly
- errno: 150 “Foreign key constraint is incorrectly formed” [closed]
- Create Array from data in the OPTIONS table
- Custom Table doesn’t create on plugin activation
- Get all the related data from WordPress DB
- How to change and edit users according to the extension in the URL
- Remove posts that start with similar words (like a delete duplicate posts plugin)
- How to verify/test that a custom built wordpress theme is as secure as possible?
- How to add a shortcode button to the TinyMCE editor?
- Is there a plugin that provides a stackoverflow style editor for wordpress? [closed]
- Modifying a JS file with data from plugin settings
- Plugin upgrading: Widget settings
- $current_user var returns NULL
- Very stubborn wp_register_script / add_action vs remove
- How to submit documentation with plugin
- Why is the generated POT file from WordPress.org not adding my plugin description to the POT file?
- Where does WordPress store plugin (enabled/disabled) status for multisite?
- Bouncing scroll
- Executing my function once on a specific time
- Override Javascript in a Plugin?
- Preview featured image using frontend post plugin
- Globally register styles but enqueue them selectively
- Creating a plugin to sanitize comment and the url field before display only
- Ultimate Member [closed]
- uninstall.php does not appear to trigger when uninstalling my plugin
- Auto move media file to cloud
- Login cookies set as wrong domain
- Create shortcode to echo javascript
- How to enable customer login to customer specific admin page
- How to use printf to output two links?
- 2 wordpress site same database
- Executing Javascript in Plugin
- How do i ‘deactivate’ a plugin only on a certain page template?
- WordPress plugin for Limited days user
- Running a function with args in add_action()
- Identify current wordpress theme
- Custom Caption on WP Nivo Slider
- How to makes changes on the shop/category/tag pages but not on the product pages in woocommerce?
- Javascript console errors and WSOD on edit post pages
- Order by post_date does not work in Previous and Next post pagination
- Make modification of add_to_cart button specific to single page
- Discern a specific plugin’s action hooks
- How to get the checkout form data from checkout page when place-order button is clicked
- WordPress post status change from published to draft
- Is there a request for products plugin for WooCommerce
- Custom Field used to allow a Free Story; no longer works
- How to send new visitor to a splash page for only one time in wordpress?
- How to set plugin across network in multisite and modify it in one place?
- Change value of Points earned in product data
- Can I upload wordpress plugin made with framework
- Call function when save setting/option in custom admin page
- How can I disable Jetpack plugin on mobile?
- GET web api method from a WordPress PHP script
- how to repeat taxonomy in different places on wordpress
- Using W3 Total Cache, I set expire headers to media, css and js files,but it seems doesn’t work [closed]
- Connection lost issue
- Move related products after product summary? [closed]
- Use a WordPress Plugin in non-WordPress .php page [closed]
- Cannot modify header information – headers already sent by
- How can I get information on who is downloading my plugin? (new to this)
- Browser Cache causes ‘Orderby=rand’ to return the same posts
- How to have certain products show for only certain users (Not roles)
- Content being rendered as empty string in posts endpoint
- WordPress Global Var in Plugin but Outside Function