by Shashi Dhar Kumar | Mar 6, 2013 | Programming, WordPress
WordPress have a very useful function that auto-saves your posts while you’re typing them in the dashboard. Though, if for some reason you’d like to disable this function, it is very easy to do. Just read on! To disable WordPress autosaving function, simply open your...
by Shashi Dhar Kumar | Mar 11, 2012 | Open-Source, Programming, WordPress
Open “function.php” add the following code to add new custom post type : <?php add_action(‘init’, ‘featured_post_register’); function featured_post_register() { $labels = array( ‘name’ => _x(‘Featured...
by Shashi Dhar Kumar | Feb 18, 2011 | Open-Source, PHP, Programming
Get the First Monday of the current Month or Get Last Day of Month or Get First Day of Month Get the First Monday of the current Month <?php function getFirstMonday($month,$year) { $num = date(“w”,mktime(0,0,0,$month,1,$year)); if($num==1) return...
by Shashi Dhar Kumar | Sep 13, 2010 | PHP, Programming
Here the function that comes under php i.e wordwrap(). You can use it for wrapping you long string text into multiple lines and easy to read. Following are the code that help you. Copy and paste the code into your editor save the code as php file and run into you...
by Shashi Dhar Kumar | Feb 13, 2010 | PHP, Programming
The Substr () PHP Function is used to return part of a string. It is written as substr (string, start, optional length);.The string is whatever string you want to return a portion of. The start is how many characters in to skip before starting. Setting this to 3 would...