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.
addthis_url = ‘http%3A%2F%2Fwww.lost-in-code.com%2F57%2Fwordpress-using-jquery-library-with-your-plugin-or-theme%2F’;
addthis_title = ‘Wordpress+%3A+Using+jQuery+library+with+your+plugin+or+theme’;
addthis_pub = ”;
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.
addthis_url = ‘http%3A%2F%2Fwww.lost-in-code.com%2F48%2Fwordpress-translate-a-plugin%2F’;
[...]
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.
addthis_url = ‘http%3A%2F%2Fwww.lost-in-code.com%2F47%2Fwordpress-using-javascript-libraries-with-your-plugin-or-theme%2F’;
addthis_title = ‘Wordpress+%3A+Using+Javascript+libraries+with+your+plugin+or+theme’;
addthis_pub = ”;
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.
addthis_url = ‘http%3A%2F%2Fwww.lost-in-code.com%2F45%2Fphp-date-difference-in-days%2F’;
addthis_title = ‘PHP+%3A+Date+difference+in+days’;
addthis_pub = ”;
Tags: date, days, difference, php, subtract
Filed under: PHP, Programming, Web Development | 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 :
addthis_url = ‘http%3A%2F%2Fwww.lost-in-code.com%2F39%2Fphp-array-to-object%2F’;
addthis_title = ‘PHP+%3A+Array+to+Object’;
addthis_pub = ”;
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.
addthis_url = ‘http%3A%2F%2Fwww.lost-in-code.com%2F38%2Fwordpress-get_pages%2F’;
addthis_title = ‘Wordpress+%3A+get_pages’;
addthis_pub [...]
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.
addthis_url = ‘http%3A%2F%2Fwww.lost-in-code.com%2F37%2Fembed-quicktime-movie%2F’;
addthis_title = ‘Embed+Quicktime+Movie’;
addthis_pub [...]
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.
addthis_url = ‘http%3A%2F%2Fwww.lost-in-code.com%2F35%2Fhtml-option-groupssections%2F’;
addthis_title = ‘HTML+%3A+Option+Groups%2FSections’;
addthis_pub = ”;
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.
addthis_url = ‘http%3A%2F%2Fwww.lost-in-code.com%2F34%2Fphp-strip-filename-from-a-url%2F’;
addthis_title [...]
Tags: filename, path, php, remove, strip, uri, url
Filed under: PHP, Programming, Web Development | No Comments »
Posted on April 19th, 2008 by lost-in-code
Using Javascript, you might want to define a variable when a page is loaded and change the value of that specific variable throughout the period of the interaction of the user with the page. You can define a variable in the HEAD section of the page like this :
addthis_url = [...]
Tags: decrease, decrement, event, increase, increment, Javascript, value, variable
Filed under: Javascript, Programming, Web Development | No Comments »