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?
- If necessary, how should wp_get_attachment_image() and its parameters be escaped?
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- theme path in javascript file
- Minimum Template Files for Theme Development
- Theme Customizer : how to create multiple-level panel
- How to change get_custom_logo() url?
- How to execute conditional script when on new customize.php (Theme Customize) screen
- How to set the default value of a option in a theme?
- How to develop a multilingual theme?
- Run shortcode before filters
- Theme elements not translating
- why does twenty eleven theme mix up the css measurement units?
- How can i customize the comment list
- Is using eval() ok in this scenario
- Should I update my _s theme?
- Display site admin profile fields in header.php
- WordPress Genesis Child Theme Filter divs
- Displaying part of every child page?
- How do I obtain the post content via a custom meta box inside the editor?
- Displaying Remote Data inside of Theme admin
- WordPress 5.8 update problem custom theme styles are overridden by core styles common.min.css
- How to correctly add JQuery in a WP theme?
- how to change a theme slug
- Weekly background code not working
- How to add code in the content area in a WordPress theme?
- Can I show all the template files that are being used on my site?
- How can i add edit shortcut icon in wordpress customizer without using selective refresh?
- Unable to pass variable on theme cusomizer add_settings()
- Switching theme only changes style sheet being used
- How to add Bootstrap Tour JavaScript to WordPress Admin Panel Dashboard Widget
- get_theme_mod returning no output
- Can I have a widget and sidebars in custom theme?
- Select full Image Size on widget “Genesis – Featured Posts”
- Where to find the code that redirects requests on the static page URL to the home page
- How to change database values on theme update
- after renaming my wp-content folder, how do I upgrade my wordpress version?
- Issue on Adding A Class to Bootstrap Navbar Walker Dropdown
- Make custom CSS changes and use built in theme customizer later?
- How to Find the Page the Front Page is Using?
- My jQuery is enqueued properly. So why isn’t it working?
- Database Tables in WordPress Theme
- 3 Level Deep Navigation Menu Not Showing All Levels
- Broken theme, template is missing
- WordPress page/blog incorporated into static website
- wp_enqueue_script not working?
- Random white space before doctype
- WordPress Theme that returns all posts as a JSON object?
- HTML block gutenberg templates
- Use a filter on menu items that have children
- Password protect a custom template
- Reusable and site-wide content that can be used in a theme
- New to WordPress – Read the Codex, Other Docs; Still Confused
- Style first 3 posts differently with WP_Query [duplicate]
- is_front_page use in sidebar.php
- matisse theme show excerpts not whole content
- My custom taxonomies are not showing up in the admin menus
- Content-Security-Policy implementation with WordPress W3Total Cache plugin installed
- How to add custom theme in hosting server?
- Infinite loop when nesting have_posts()
- WordPress Custom Theme : Theme Builder vs ACF vs Gutenberg
- Is_single not working properly in genesis
- Debugging slow WordPress Theme Customizer (Any option similar to Query Monitor)?
- How to show children pages as array
- How do I keep images in posts below a certain size without editing the post?
- Theme options not displaying correctly after theme update
- Is it possible to customize the layout of Gallery Shortcode?
- How can i use archive.php for indexing wordpress default posts?
- What to do when child theme is out of date with parent theme
- Image Size wrong during upload
- How can I add a single image from a gallery into the page header?
- WordPress Includes mejs 404 error
- How to add group-row to InnerBlock template?
- Checkboxes on custom `WP_List_Table` also check select all