Support » Fixing WordPress » Proper way of extending the plugin

  • Hello,

    I got the following task:
    – I want to add a function and an add_action to the functions.php of the current theme
    – The function needs to be dynamically added to the functions.php whenever the main theme is changing

    What’s the best way of doing this?


Viewing 1 replies (of 1 total)
  • I am currently trying it in a plugin.
    I think long-term, this is the smartest idea.

    I got a question regarding the add_action function.
    Where do I need to put the add_action function within a plugin in order for the action to be executed every time the specific action is called?

    register_activation_hook or will it then only be executed when the plugin is activated?
    I got a plugin_load function that is being called in the plugin code, will this be sufficient?


Viewing 1 replies (of 1 total)
  • The topic ‘Proper way of extending the plugin’ is closed to new replies.