When using the above code I got an error Warning: call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members in D:\wamp\www\euphoria\wp-includes\plugin.php on line 406
–
Harish ChouhanMay 26 '13 at 6:43

Well, I tested before publishing and did again, no problems on my side. And cannot see a reason why there'd be a function missing any argument. Sorry to hear.
–
brasofiloMay 26 '13 at 7:17

Hi, This worked great when added in the functions.php. I was trying to add it in a custom plugin. Any suggestion how to make this work in the plugin?
–
Harish ChouhanMay 26 '13 at 11:07

I really don't know what could be going wrong on your side. Do you have debug enabled?. I tested as a Must Use plugin, a regular one and also inside functions.php. Works in all of them.
–
brasofiloMay 26 '13 at 13:39

Hi, Yes I hve debug enabled. But I guess it must be some error on my part as it worked well when placed in functions.php Thanks @brasofilo. Really appreciate your time.
–
Harish ChouhanMay 26 '13 at 14:53