Snippets · Wordpress · WP-ADMIN

How to Change Placeholder In Post Title

In WordPress Admin, You can change Placeholder of `Post Title` by using following code into your theme’s `functions.php` file. Add this Code into your theme’s functions.php file

Rate this:

Snippets · Wordpress · WP-ADMIN

Enable Hidden Admin Feature Displaying ALL Site Settings

Here is little Snippets of WordPress that I’d like to share with you.Following code will help you to display complete list of all the settings from `options` table of database. You can see this page in “wp-admin –> Setting –> All Settings“. Add Following code to your theme’s `functions.php` file: function enable_all_settings_link() { add_options_page(__(‘All Settings’),… Continue reading Enable Hidden Admin Feature Displaying ALL Site Settings

Rate this:

Keyboard · Shortcuts

Computer Keyboard Shortcut Keys

~~~~~Enjoy Typing~~~~~ Common – Keyboard Shortcuts 1. CTRL+C (Copy) 2. CTRL+X (Cut) 3. CTRL+V (Paste) 4. CTRL+Z (Undo) 5. DELETE (Delete) 6. SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin) 7. CTRL while dragging an item (Copy the selected item) 8. CTRL+SHIFT while dragging an item (Create a shortcut… Continue reading Computer Keyboard Shortcut Keys

Rate this:

MySql · PHP · Snippets

How To Add Column In Table If Not Exist ?

Hello everyone, Today i am sharing little information about MySql alteration with database table. I have added following function to help you to create column in db table if column not exist. /** * To Add Column In Table If Not Exist. * @param $db_name Database Name * @param $table Table Name * @param $column… Continue reading How To Add Column In Table If Not Exist ?

Rate this:

Date · PHP · Snippets · Week

How to get all days of week from given date.

Hello!,Here i have added php code for getting all days of week from given date. Following function will help you to get this. /** * Get all days of week. * @param date $date */ function getDaysOfWeek( $date ) { list($day, $month, $year) = explode( “-“, date(‘d-m-Y’, strtotime($date)) ); // Get the weekday of the… Continue reading How to get all days of week from given date.

Rate this:

Distance · Location · PHP · Snippets

How to get distance between two points ?

Following function calculates the distance between two points (given the latitude/longitude coordinates of those points).The calculated distance can be shown in following units. Miles Nautical Miles Kilometeres Meters Yards Feet Inches Here is the function to calculate distance between two points :- /** * Get distancce between two points. * eg.:- $point1 = array(‘lat’ =>… Continue reading How to get distance between two points ?

Rate this:

PHP · Snippets

How To Sort An Array By Value ?

You can sort an Array by value with following function:- function sortByValue (&$array, $key){ $sorter=array(); $return=array(); reset($array); foreach ($array as $ii => $va) { $sorter[$ii] = $va[$key]; } asort($sorter); foreach ($sorter as $iii => $va) { $return[$iii] = $array[$iii]; } $array=$return; return $array;} Have Fun!

Rate this: