I am working on a WP plugin and I want to add a custom function to pluggable.php (located in /wp-includes). I am calling that function from admin.php (located in /wp-admin)
eg. Consider the function
auth_redirect which is called from admin.php.
auth_redirect is the function defined in pluggable.php which checks for logged users, else it redirects them to login page.
Similarly, I have my own custom function.
So, is there any specific hook or filter which I must use to attach my function to pluggable.php.
Currently, I am using
fwrite() to add my custom function to pluggable.php. But, I guess this isn't the right way.
So, can you suggest me the right way of inserting my custom function and calling it from admin.php
Any help will be appreciated.