This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * An example function used to demonstrate how to use the `user_can_save` function | |
| * that provides boilerplate security checks when saving custom post meta data. | |
| * | |
| * The ultimate goal is provide a simple helper function to be used in themes and | |
| * plugins without the need to use a set of complex conditionals and constants. | |
| * | |
| * Instead, the aim is to have a simplified function that's easy to read and that uses | |
| * WordPress APIs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Usage: defaultValues.init(Element to bind); | |
| var defaultValues = { | |
| isOn : false, // Needed to se state of object | |
| isBind : false, // Check if the elm's have the blur and focus binded | |
| ThisElm : false, // Default to false. | |
| // Init function | |
| init: function($elm) { | |
| // Check if it's off and not bound. | |
| if (!this.isOn && !this.isBind) { | |
| this.ThisElm = $elm; |