According to the wordpress documentation for changing the theme, a child theme is used, which is quite logical. But what about plugins?

Ie the task is such that to make adjustments to the code of the plug-in while not touching the source code. Is it possible to substitute a plug-in file by analogy with child themes?

    2 answers 2

    Unfortunately, there is no such possibility. You can extend the plug-in classes in your plugin or modify its work through hooks. All this provided that the necessary classes and hooks are defined in the "parent" plugin.

    • Ie if I understood correctly, if something in the plugin does not suit, right the code of the plugin itself? - user199588
    • @ user199588 if you cannot do it through classes or hooks, then yes. So we had to do in some cases. - KAGG Design

    Ie the task is such that to make adjustments to the code of the plug-in while not touching the source code. Is it possible to substitute a plug-in file by analogy with child themes?

    If the plugin has an API or at least a check for the existence of functions, then you can change them in your plugin or theme function file. If not, then oh. To write unless to the developer to make check of functions.

    Ps. Speech about php-code. There are no problems with css, they can always be redefined.

    • In the sense of `in its plugin`? - user199588
    • In the sense of making your own plugin that will do the above .. .. - SeVlad