I'm currently writing a plugin that will not work without adding a simple action hook to one of the core files located in the wp-admin folder. Without violating best practices is it possible to copy that target file within the same directory, edit add the hook,rename it, and then redirect calls over to the new file?
-
2Definitely not a best practice. Why not just copy the function and make your own version of it in your plugin? You'll need to add more of what you want to accomplish to get more assistance.– rudtekSep 21, 2022 at 3:57
-
Seems like XY, what are you trying to achieve that editing core files is the only solution?– Buttered_ToastSep 21, 2022 at 9:18
-
Essentially this is what I'm trying to accomplish– Jay MandellSep 21, 2022 at 21:17
Add a comment
|