WordPress Theme – wp_enqueue_script() and Conditional Tags
March 06th, 2009 | Author: Sunny
Conditional Tag:
Using Conditional Tags for testing whether a certain condition is met, and then returns either TRUE or FALSE.
For example,
is_home() will return TRUE if the main blog page is being displayed.
Some of the conditional tags may contain parameters for conditions. More information can be found here: http://codex.wordpress.org/Conditional_Tags
Function: wp_enqueue_script():
wp_enqueue_script(handle, src, deps, ver) is a function for adding Javascripts to a WordPress generated page. It accepts four parameters:
Usage: wp_enqueue_script(handle, src, deps, ver)
handle - (string) Name of the script. Lowercase string.
src - (string) (Optional) Path to the script from the root directory of WordPress. Default is false.
deps - (array) (Optional) Array of handles of any script that this script depends on; scripts that must be loaded before this script. Default is false.
ver - (string) (Optional) String specifying the script version number, if it has one. Defaults is false.
New Mac Pro (WTF)
March 05th, 2009 | Author: Sunny
Yesterday I was checking out the Apple site, and saw a new Mac Pro. I was so pissed… because I just bought it like 2 months ago (which is Early 2008 model) and the new model claims that it is 2x as fast as the Early 2008 3.2GHz system(mine is 2.8). Damn… the new model really outdates my Mac Pro now.. and I paid more for upgrading to 4GB ram, and new model with the same amount of money I paid already comes with 6GB RAM already!!!! WHY!!! Already pissed when I bought it ONE DAY before iLife ‘09 announced and no free upgrade… am I just bad luck??? damn Apple!
I still love your product, but it is heart broken and so does my money in my wallet! (At least you should lower the price for a older model before the new model coming out!!)
WordPress Theme – bloginfo() and include tags
March 05th, 2009 | Author: Sunny
I am learning Flex and iPhone programming right now, but since I have installed WordPress, so I have decided to learn about how to write WordPress Theme first. (Yea.. I just want to learn everything…)
This is my very first WordPress Theme. Very simple, and kinda modified from the default theme which comes with WordPress. I actually have hard time to understand the API and function references from WordPress when I was drafting it at the beginning, but it is kinda straight forward. It is not completely done, and I may just zip it here when it is completed in the future.
I am not going to write much detail here, but going to put some references here for myself for future development.
bloginfo() , get_bloginfo():
http://codex.wordpress.org/Template_Tags/get_bloginfo
get_header(), get_footer(), get_sidebar(), comments_template():
http://codex.wordpress.org/Include_Tags