This actually comes from a specific WordPress issue, but there is a more general PHP point for which I am interested to know the answer.
The WordPress class corresponds to the following lines:
class Tribe_Image_Widget extends WP_Widget {
function example_function(){
}
}
Is there any way in PHP that I can replace example_function()outside the class?
The reason I want to do this is because the class belongs to another WP plugin (and has several functions in the class), and I want to keep getting plugin updates, but I want one of the functions to be adapted. If I change the plugin, I will lose all my own changes every time. SO, if I have my own plugin that just changes one function, I avoid the problem.
source
share