You are here: Blog » Posts Tagged "php"

php

WordPress Add Allowed File Types

ft

The WordPress media uploader is a great tool that allows you to easily include images, videos, documents, and audio on your site. One of the security features associated with the WordPress media uploader is that you are only allowed to upload specific file types. This WordPress Add Allowed File Types tutorial will show you how you can include additional filetypes in your list of allowed uploadable files.

Read More

print_r pre

small_8484119632

When you are using a print_r in php, it’s a very good idea to remember the print_r pre combo (ie wrap the print_r in a pre tag). The difference being that using pre will allow you to understand the output as it will be preformatted in a way that is easy for humans to see…

Read More

Copyright Current Year PHP

small_4371001458

One trick that I often use when building a site is to set the copyright year in the footer (or anywhere else you may want it) to always display the current year. This way, in the future you don’t have to worry about remembering to update it manually.   Here’s how to do it in…

Read More

Twitter API 1.1 Example

small_8476983849

In the footer of this website, I show my latest tweet. Until now I had been using Twitter API 1.0. Today Twitter stopped service for API 1.0 and I had to scramble to fix it so that it would work with Twitter API 1.1 (turns out it’s a lot more complicated). Here is the code…

Read More