Hooks are a way for one piece of code to interact/modify another piece of code at specific, pre-defined spots. They make up the foundation for how plugins and themes interact with WordPress Core, but they’re also used extensively by Core itself.
Continue reading “WordPress Hooks”Author: admin
Animated header
Javascript Promises
My collected notes on the topic of Promises in Javascript.
A Promise
is an object representing the eventual completion or failure of an asynchronous operation.
Sorting multi-dimensional arrays in PHP
Some basic code examples.
MySQL
My personal cheatsheet/reference.
Continue reading “MySQL”PHP Notes
All keywords (e.g. if, else, while, echo, etc.), classes, functions, and user-defined functions are NOT case-sensitive, but all variable names are case-sensitive.
A variable starts with the $ sign, followed by the name of the variable
A variable name must start with a letter or the underscore character
A variable name cannot start with a number
A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
Variable names are case-sensitive ($age and $AGE are two different variables)
Closures continued
Previously I gave a brief introduction to closures in Javascript. Here I will attempt to provide more understanding on this topic. I will lead into the topic of closures by beginning with a look at an infamous problem with for loops in Javascript. I will also briefly touch on Immediately Invoked Function Expressions (IIFEs).
Returning in Javascript and Intoduction to Closures
Functions return a value of undefinded
by default, unless we explicitly tell it to return another value.
How do we do that?
Continue reading “Returning in Javascript and Intoduction to Closures”