Adding a sub-menu in the wordpress admin menu :)

For the impatient ones, first the code:
(in wp-admin folder, open the file menu.php) and locate the code:

$submenu[\’edit.php\’][10]  = array( _x(\’Add New\’, \’post\’), \’edit_posts\’, \’post-new.php\’ );

and add the below:

$submenu[\’edit.php\’][7]  = array( _x(\’Pending\’, \’post\’), \’edit_posts\’, \’edit.php?post_status=pending&post_type=post\’ );

And now the explanation and why do you need this 🙂

Problem:

There is no direct mechanism to access the pending posts in WP admin. I generally post through email and mark them as pending. So, whenever I go to my admin POSTs page, I will look through the list of pending items and post them as and when required. For this, when I am done with changes in one item, I need to either modify the address bar or need to go to posts link and then click the Pending items.

I kind of did not like this so added one submenu just below the add new.. Cool, this is my first hack of the WP-core to get something going. For Plugins and sidebar I have kept doing this anywasys 🙂

\"Enhanced

SMS from my site – free worldwide.

Thanks to Free widget, now you can send worldwide free SMS from the widgets in my blog.

Hope it helps you.

Find who is using my network – top for network utilization

Ok here is something that I have been looking for something.  Now that I have conky installed, so I can see the bandwidth usage on my desktop but was wondering for sometimes, where actually so much is being used. So did some quick search to see if I can get that info and did not have to go too far 🙂

There is s  utility called iftop in the Fedora repo and at the URL. Oh and how to use it, just type sudo iftop or if you have multiple network interface then you can do \”iftop -f <device name>\”. Thats pretty simple and cool.

Name       : iftop
Arch       : i386
Version    : 0.17
Release    : 7.fc9
Size       : 71 k
Repo       : installed
Summary    : Command line tool that displays bandwidth usage on an interface
URL        : http://www.ex-parrot.com/~pdw/iftop/
License    : GPLv2+
Description: iftop does for network usage what top(1) does for CPU usage. It
: listens to network traffic on a named interface and displays a
: table of current bandwidth usage by pairs of hosts. Handy for
: answering the question \”why is our ADSL link so slow?\”.

For those of you, fond of pictures, here\’s a screenshot:

\"iftop\"