samedi 18 avril 2015

Is it ok to add properties to WordPress userSetting object directly?

WordPress has a utils.js file which has provided four utility functions to manipulate settings and store them in a cookie. it also creates a global variable called userSettings with the following properties:



  • url

  • uid

  • time

  • secure


Now, my plugin also wants to create one/more properties and instead of creating a new object I thought I'd use the one WP has already created.


Is it a good idea to store my plugin settings in this object. one of the properties is the full url of the website.


Aucun commentaire:

Enregistrer un commentaire