• How To?
  • Tips ‘n Tricks
  • WordPress
  • Snippets
  • Software
    • Browsers
    • Downloads
  • Web
  • Tools
    • Character Counter
    • chmod Calculator
    • Entities Encoder
    • Live HTML Editor
    • My IP
  • Contact
Twitter Facebook Google+ RSS
You are here: SumTips » Snippets » WordPress Snippets » Disable WordPress Comment Form User Details Cookie

Disable WordPress Comment Form User Details Cookie

Posted on July 10, 2012 by Renji | Short URL: http://sumtips.com/?p=7167

When a person posts a comment on a WordPress site, the information – name, email, and website – they provide is stored in a cookie in the browser. These details are automatically fetched and prefilled in the comment form across the site, saving a visitor from unnecessary repetitive typing of the same information in all comment forms.

If for some reason (like the new European Union’s directive to require permission for saving cookies) you would like to disable this functionality, it can be done with this single line of code in the functions.php file:

remove_action( 'set_comment_cookies', 'wp_set_comment_cookies' );

Cookies are set by wp_set_comment_cookies() and this function is hooked into set_comment_cookies. Above action will remove it the function.

And thats it – no cookies set when someone posts a comment.


Tweet

Related posts:

  • Add Option to Hide/Show Comments on Google+ Posts with +Comment Toggle
  • Get Back Facebook Comment Submit Button and Old Behavior
  • Create New User in WordPress Using functions.php
  • Make WordPress Remember Your FTP Details
  • Add Pages, Custom Post Types in WordPress Site Feed
Categories: WordPress Snippets
Most Commented WordPress Posts in the last 30 days
Remove Website and Email Fields from WordPress Comment form

  • Get Updates via Email

  • Recent Posts

    • CMS2CMS: Migrate Site from Drupal or Joomla to WordPress
    • WordPress: Add Preview Button in Distraction Free Writing
    • How to Activate or Deactivate Individual Jetpack Modules
    • Windows 8: Auto Update Defender with Windows Update Disabled
    • Automatically Start and Close Programs at Specific Time
    • How to Copy Code from Notepad++ with Syntax Highlighting
  • Random Posts

    • Extract Original URL From Shortened URL with KnowURL
    • Dropbox 1.0 Final Released
    • OldBar: Detachable Desktop Folder Toolbars on Windows 7 and 8
    • Create Bootable Windows ISO Image From Setup Folder
    • Grooveshark Goes HTML5
    • View Individual Post's Popularity in Google Reader with PostRank
  • Categories

    • Blogging
    • Games
    • Google
    • How To?
    • Linux
    • Microsoft
      • Windows
    • Miscellaneous
    • Phone
    • Snippets
      • AutoHotkey Snippets
      • CSS Snippets
      • htaccess Snippets
      • JavaScript Snippets
      • PowerShell Snippets
      • WordPress Snippets
    • Social
    • Software
      • Browsers
    • Tips 'n Tricks
    • Wallpapers
    • Web
© SumTips. Contact | Sitemap | Privacy Policy