Tuesday, 10 December 2013

Buddypress show date and time of post instead of elapsed days and hours

In the themes functions.php add this (the 19800 is 5:30 hours in seconds for IST) :

function format_activity_date() 
    return date("M j, Y G:i", strtotime($activityDate)+19800);
add_filter('bp_activity_time_since', 'format_activity_date');

Note: This does not affect comments

Friday, 6 December 2013

Wordpress - Create a plugin to override a pluggable function



Thursday, 5 December 2013

Change the version of a wordpress javascript file

Search for wp_enqueue_script and change the version number in the argument.


Using at and crontab


List of all users and groups

To view all users:

cat /etc/passwd | cut -d: -f1

To view all groups:

cat /etc/group |cut -d: -f1