Posted on June 28th, 2008 by lost-in-code
When you develop a Wordpress plugin or theme, you might want to make use of the jQuery library included and distributed with the Wordpress package.
Read more »
Tags: jquery, library, noconflict, plugin, theme, Wordpress
Filed under: Javascript, PHP, Programming, Web Development, Wordpress, Wordpress Plugins, Wordpress Themes | No Comments »
Posted on June 25th, 2008 by lost-in-code
First off, you have to know that not all Wordpress plugins can be translated. The plugin developer(s) had to take the necessary steps such as using the Wordpress __() and _e() functions and load_plugin_textdomain() in order to parse the strings/text of the plugin through the localization system.
Read more »
Tags: language, localization, localize, plugin, translate, translation, Wordpress
Filed under: PHP, Programming, Web Development, Wordpress, Wordpress Plugins | No Comments »
Posted on June 21st, 2008 by lost-in-code
When you develop a Wordpress plugin or theme, you might want to make use of some of the Javascript libraries distributed with the Wordpress package such as Prototype, Scriptaculous and jQuery.
Read more »
Tags: add javascript, Javascript, libraries, plugins, themes, Wordpress, wp_enqueue_script
Filed under: Javascript, PHP, Programming, Web Development, Wordpress, Wordpress Plugins, Wordpress Themes | 4 Comments »
Posted on June 17th, 2008 by lost-in-code
You might need to calculate the date difference in days using PHP. You can easily calculate the days difference by using something like the code below.
Read more »
Tags: date, days, difference, php, subtract
Filed under: PHP, Programming, Web Development | No Comments »
Posted on June 13th, 2008 by lost-in-code
I had to get a new notebook yesterday after spilling a cup of green tea on my Macbook pro. I’ve spilled some liquids on it before, but this time the keyboard and trackpad stopped working completely.
Read more »
Tags: hash, keyboard, mac, macbook, pound, shortcut, sign, symbol
Filed under: Uncategorized | No Comments »
Posted on May 6th, 2008 by lost-in-code
I wrote a quick and simple function which allows you to quickly convert arrays to objects. It allows you to change an array like this :
Read more »
Tags: array, convert, object, php
Filed under: PHP | No Comments »
Posted on May 4th, 2008 by lost-in-code
The Wordpress get_pages function works similar to the get_posts function which fetches posts from the database by criteria. The get_pages function takes different arguments and allows you to take control of parent and child pages as you execute the function.
Read more »
Tags: get_pages, pages, Wordpress
Filed under: PHP, Programming, Web Development, Wordpress | No Comments »
Posted on April 29th, 2008 by lost-in-code
Embedding a Quicktime movie player into your webpage work similarly to embedding Flash files, making use of the OBJECT, EMBED and PARAM tags inside your HTML code. You can play .MOV, .MP4 and .MPEG files with the embedded Quicktime movie player.
Read more »
Tags: .mov, .mp4, .mpeg, embed, movie, object, quicktime
Filed under: HTML/XHTML, Javascript, Programming, Web Development | No Comments »
Posted on April 28th, 2008 by lost-in-code
Have you ever wanted/needed to create a select drop down menu with options divided into sub-sections or groups with labels? See the screenshot below.
Read more »
Tags: groups, html, optgroup, option, sections, select
Filed under: HTML/XHTML, Programming, Web Development | No Comments »
Posted on April 26th, 2008 by lost-in-code
Using PHP, you might need to strip the path from a URL, leaving behind just the filename at the end of the URL. You can achieve this with a regular expression pattern of course, but I have a much simpler solution. See the example code below.
Read more »
Tags: filename, path, php, remove, strip, uri, url
Filed under: PHP, Programming, Web Development | No Comments »