WordPress how to add httponly and secure flag to all SETCOOKIE() function?

I am new to wordpress. In few plugin’s code, some of the setcookie() functions has HTTPOnly and Secure flag already SET and some of the setcookie() functions are without HTTPOnly or secure flag in a code.

How can I set all setcookie() functions with HTTPonly and Secure flag, No matter HTTPOnly or Secure flag is set or not.

If I apply code for setting above flags to TRUE either in .htaccess, or use ini_set() in index.php or changes in Apache configuration, Will this affect my existing WordPress working?

Or anyone has better solution?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s