Hooking a Pluggable Function
-
I hate to ask stupid questions, and I pray this isn’t one… Regardless, I am trying to hook the random_password filter in the pluggable wp_generate_password function. I spent a good long time trying to figure this out, and recently realized what I thought was my problem. I was adding the filter in the constructor of my plugin, which occurs before wp_generate_password exists. Now, as far as I know, you could add a filter for anything at anytime, and it only matters what’s hung on that hook when the apply_filter function is run. Well, better safe then sorry I say, so I added a plugins_loaded hook and moved my random_password in there so that my hook would safely be defined after pluggable was loaded. Still no dice! I’m losing my mind! Can anyone assist?
- The topic ‘Hooking a Pluggable Function’ is closed to new replies.