You should use a nonce to protect yourself from CSRF attacks.
Even though you’re not sending anything to the database, I’d suggest using some of the built in data validation functions (there is even a is_email
function for you to use!) to strip out any HTML from your email. esc_html( striptags( $your_email_content ) )
, for instance.
You could also throttle contact form submissions from a single IP to prevent someone from submitting the same thing many times. I don’t know of any contact form plugins that do that, but the WordPress comment system show you an error page if you submit too many comments within a certain period of time.
Related Posts:
- How to sanitize select box values in post meta?
- What is the safe way to print tracking code / pixel code before tag or tag
- Worthwhile to restrict direct access of theme files?
- Should `get_template_directory_uri()` be escaped?
- What is the difference between esc_html and wp_filter_nohtml_kses?
- Can I create customizer setting that can handle plugin shortcode?
- Is it good to rename theme folder downloaded from WordPress.org?
- When to use esc_url, esc_html, esc_attr, and friends?
- Worthwhile to restrict direct access of theme files?
- Where i should not use if (!defined(‘ABSPATH’)) { exit; }?
- What is the difference between strip_tags and wp_filter_nohtml_kses?
- Whats the safest way to output custom JavaScript and Css code entered by the admin in the Theme Settings?
- Is it safe to enqueue a font style without putting http or https?
- Using esc_url with a hard coded url
- Underscore Based Theme File Permissions in Git
- correct tags for validating input types
- How to escape html generate by a loop
- How to escape multiple attribute at once in WordPress?
- How to allow certain PHP functions when using sanitize_callback in the word press customizer
- Do I need to escape get_the_post_thumbnail function?
- My contact form – I’ve changed the source code but the changes are not being applied
- Strict Folder and File Permissions for WordPress Themes Folder
- hide theme files for admin beneath root
- Data Validation & Sanitization for Big HTML Blocks
- Trouble creating custom sanitization function when uploading video files
- How to use esc_attr__() function properly to translate a variable that contains string?
- Should we escape the values of constants?
- Change admin bar to default:off
- Template for individual post designs
- The seventh parameter passed to add_submenu_page()
- What would happen if the admin installs a plugin when the plugin is included in the theme?
- How do I get my child-theme to work with my theme’s includes folder?
- wp_insert_post breaks rewrite rules
- Where can I find a good reviewed collection of Twenty Ten child themes?
- Template Hierarchy for get_header()
- How to add (css) classes to only one wp_nav_menu()?
- Remove frameborder attribute from iframes
- How to add suggest plugin to theme?
- how do I get a sidebar’s id or number for use with is_active_sidebar()
- Looking for the code in twentyten that allows users to select images for the header/banner
- Relative Time On Posts
- Prevent update check for specific theme
- How to determine which custom header image is being shown
- using wordpress without javascript
- Theme Check: Could not find post_class
- Override theme programmatically
- Set a static front-page as a landing page programmatically
- can’t understand _e function well
- WP 3.1 upgrade breaks AutoFocus+ theme
- Comment entry screen shows even though “Allow Comments” is unchecked
- How can I display/hide certain content based on a Theme Option field?
- Custom WordPress Theme – Search not working on posts
- How can I make that when I clic on one of the menu items, that page shows only posts with the same category?
- How to make theme elements customizable in wordpress?
- Where to hook settings api init
- How to obtain a reference to the_excerpt() from custom loop
- defining a folder location in order to recall it
- JavaScript stops working on selectively refreshed sections one inside the other
- Is wp_kses the right approach in sanitizing this string?
- Why doesn’t my css work when I check my theme on mobile devices? [closed]
- Remove settings if theme is deleted?
- Common single page template options
- Custom Blocks as part of a theme
- How to set up diffrent mobile theme for single site in WordPress?
- Enqueued JavaScript is not working
- Derive child theme from separate theme
- How to Download Minimum Requirement of WordPress (Not Themes )
- How to code custom special page
- Displaying the right content on a page url
- Is it possible to set a variable for get_post_meta?
- Custom admin logo not showing after wordpress 4.5 upgrade
- Unable to change the priority with ‘remove_action’ and ‘add_action’ in child theme
- Translate a child theme with pure PHP and gettext
- Remove h1 from 2015 theme
- Only the latest post shows up on post page?
- WordPress pulling in random page themes
- Trouble in enquing all js files under certain directory
- Can’t change theme name
- Stop WordPress from showing images on non post pages
- enqueuing external and internal js and css in wordpress did not work with owl.js animate.css
- Next and previous post link shows error in first and last post
- Problem with pagination link (error 404)
- WordPress wp_get_current_user returning blank values until refresh
- use a single nonce in three different nonce field
- Whether an tag is required in header?
- Theme is Enqueueing Everything in Footer
- Local theme changes upload on server but theme changes not showing
- Media & Plugin screens stall
- wp_kses allow checkbox class and checked
- Is wp_mail plugin territory?
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- Understanding WordPress theme files and underscores
- New theme HTML5 Support for Search in WordPress 4.4
- How do I remove p tag *insertions*? Disabling `wpautop` removes manual tags
- Create a variable with string, array or multiple values
- What hook to use for loading a custom class extension during Theme initialization?
- Use external fonts in WordPress stylesheet
- Custom link color or stylesheets
- What is the advantage of using home.php over index.php for the front page
- What is the point of using archive.php instead of index.php?