Array Chunk

Using array chunk (array_chunk) we can easily split an array into a multidimensional array (an array of arrays). The array chunk function could be used to break an array into smaller parts, perhaps to make it easier to process. Basic Example Composition Features and Specific Examples Further Reading Basic Example Assuming we setup an array…

Array Change Key Case

Array Change Key Case (array_change_key_case) is a simple function THAT allows you to make all the keys of your array uppercase or lowercase. Basic Example Composition Features and Specific Examples Further Reading Basic Example If we setup an array with uppercase keys (line 1), we can use the array_change_key_case function to make all of these…

Improving Productivity and Focus by Removing Distractions

I am a remote worker. This means that I, and the majority of the people I work with also work remotely. This may be from their home, from a shared workspace, from a cafe or even in the middle of a field if they choose to. When you work remotely you have one obvious disadvantage.…

Stop Clickjacking by preventing your WordPress site from Loading in a Frame

Clickjacking is a potential security risk caused by someone loading your website inside a frame on another website and making it appear as if the website is legitimate, however they will be hijacking interactions you make with that site, such as form submissions. For example if your website requires a user to login, the malicious…

Prevent XSS (Cross-Site Scripting) by escaping values in your WordPress templates

If you are developing a WordPress theme or plugin then it is important to make it as secure and robust as possible. One way to do this is to properly escape values that you use in your project so that XSS (Cross-Site-Scripting) is prevented. An example of a XSS attack may be that you have…