I have a plugin whose that has a class method i want to add on to. Since this is a WordPress plugin I can't really edit their code since future updates would break my changes.
How do I add this:
alert('bar');
to the edit method below:
var builder_blvd = {
// Lots of stuff here
edit : function ( name, page ) {
alert('foo');
}
// Lots of other stuff here
};
The result should be 2 alert messages, one for 'foo' and another for 'bar'? Is this doable or do i have to make a new copy of the entire builder_blvd class?