Created
May 2, 2020 14:01
-
-
Save dotherightthing/3fc780b3cd73f3232c3778f379a3cc90 to your computer and use it in GitHub Desktop.
Pluggable function #wordpress #cheatsheet #hooks #filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Pluggable function | |
* Allows the function to be overridden/replaced | |
* | |
* This technique is only useful if the function | |
* is not attached to an 'action' or 'filter' hook | |
* as those can be overridden, | |
* or removed via remove_action() or remove_filter() | |
* | |
* @see http://wpcandy.com/teaches/custom-hooks-and-pluggable-functions/#.WZFYh3cjFlc | |
* @example | |
* if ( ! function_exists( 'wpdtrt_pluggable_function' ) ) { | |
* // code that may be overridden | |
* } | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment