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?
- How to assess whether a WP core (or other) function is escaped already or not?
- Add option for administrator to submit link
- Why am I getting posts back when I shouldnt
- Theme with Isoptope after activation in new install not working well [closed]
- customize functionality of share buttons under each blog post [closed]
- Display recent posts on front page
- Best practice to create required pages
- custom theme’s search not working
- A problem in loading index.php
- Permalinks problem with custom theme
- wordpress page as website
- How to create sub-menu in “Allure Real Estate Theme for Placester”?
- How to make admin theme option with image slide show?
- load src of images that attachs in wordpress’s post
- Purchased Theme to Custom Made Theme? [closed]
- Explanation of User Roles and Capabilities
- Add Field To All Pages
- How to make website with many template that active [closed]
- Creating custom function in wordpress to return data from database
- Custom Single Page Portfolio Theme [closed]
- Query for tag given slug
- How to add Dummy content when active wordpress theme without xml import?
- WP site makes mobile browser crash for high memory usage
- Image Size wrong during upload
- Next Post Link not working with parameters to restrict to same term
- Fatal error: Call to undefined function the_posts_navigation()
- How customizable is a self-hosted WordPress blog compared to a Blogger blog?
- Replacing static code in a template file with a sidebar and widgets?
- How to install Woocommerce without plugin?
- Why we do need wp_enqueue_script() function?
- Correct way to make a title a link
- Is there any reason that other theme elements (such as nav menus) shouldn’t be within the loop?
- Getting URL of Resized Image
- Is there a WordPress theme or plugin with built-in user management
- Detect custom font size
- Is it possible to use “wordpress.org Theme Handbook” look&feel as a theme in my own site? [closed]
- How can I add a single image from a gallery into the page header?
- Is there any way to show child theme in theme detectors?
- How to remove proudly created by WordPress in theme?
- Should I create a child theme for a parent custom theme? [closed]
- How to load custom php file in WordPress themes
- getting id of page
- Roll my own theme or customize an existing one [closed]
- How to create full header but keep content narrow
- How to make a sticky footer?
- Jquery Ui Tabs not working
- Recent posts with comment count in “Sidebar” template [closed]
- HTML to WORDPRESS [closed]
- How can i display a 4 diferent themplate for the archive page
- Adding a new layout for genesis
- Why do some sites show themes/”themename” as the only theme?
- How can i move my product name & price from below thumbnail to be the rollover content in Avada & Woocommerce?
- How to split the site’s layout without damaging this layout? [closed]
- posts stuck as drafts
- why my WordPress theme doesn’t support shortcode? [closed]
- I’m new in developing responsive WordPress Theme, so which framework to use or work from scratch? [closed]
- themeforce (happytables framework) implementation
- Which function(s) to build a paged HTML table
- Isotope overlapping .items because of featured images – HELP! [closed]
- white spaces on the all sides [closed]
- Twenty sixteen – full height
- Is there any open source WordPress Themes?
- How do I add new layout width options in WordPress editor?
- Theme.json: creating different sections of the color palette
- DIV containing iframe disappears below break point of 992 in Oxygen Builder
- Custom background not showing
- Correct way to make a custom block theme responsive
- Is there a way to prevent wp_head from outputting self-closing tags?
- WordPress Block Theme: Customize meta viewport
- Multiple content areas with Gutenberg – Transparent areas mid content
- Is it possible to have two templates in an article hirearchy?
- Develop theme with demo default content, programmatically create pages