• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Implemented "Pluggable" functions

Jafo

Active member
#1
The ability to replace functions. Take for example a function in the Wordpress pluggable.php file:

if ( !function_exists('wp_get_current_user') ) :
/**
* Retrieve the current user object.
*
* @since 2.0.3
*
* @return WP_User Current user WP_User object
*/
function wp_get_current_user() {
global $current_user;

get_currentuserinfo();

return $current_user;
}
endif;

This really helps when doing integrations or bridges to other platforms. Of course not every function is in there, but many of the key ones are. I cannot think of how many times I wanted to replace for example. the fetch_template() function in VB lol..