What is WordPress Pluggable Function

A pluggable function lets you override certain core functions using a plugin. If you take a look at your wp-includes/pluggable.php, you will see a lot of functions wrapped in the functions_exists check. Which means if the function doesn’t already exist, it uses the one inside conditional.

If you define a function of the same name, you can make the core WordPress run the function of your version along with the additional code supplied.

 

The most used pluggable function is the wp_mail which sends emails in WordPress by default. With pluggable functions, you can shut down automatic emails in your development environment, so you won’t be able to receive mail notifications.

 

Read the rest of the post here: wp-includes/pluggable.php

Leave a Reply

Your email address will not be published. Required fields are marked *

*