• Dharma

    (@dharmashanti)


    Occasionally, I use a plugin to add functionality to a site. But sometimes, the information outputted by a plugin function needs to be modified.

    For example, I was using the My Calendar plugin. Only problem was that the Previous/Next links were giving the incorrect URL. Rather than hack the plugin directly, I wanted to add a function to the theme’s function.php file that would filter the output of the plugin function that creates the Previous/Next links.

    I tried using the name of the function as a hook, but that didn’t seem to work. Is there a way to do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can only use a filter or an action if the plugin author included one or more of them for you to use. look for do_action or apply_filters in the plugin source.

    Haven’t ever looked at the code for the My Calendar plugin, but some developers are really good about making their code extendable and everything has hooks, others, not so much.

    Best of luck.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Filter a Plugin Function’ is closed to new replies.