I’m working with a plugin that declares a function using this format:
if (!function_exists('ABdevDND_get_current_post_type')){
function ABdevDND_get_current_post_type() {
...
}
}
I’m trying to declare it in my theme’s functions.php file, by just using:
function ABdevDND_get_current_post_type() {
...
}
But my timing is wrong, and I’m getting Fatal error: Cannot redeclare ABdevDND_get_current_post_type()
.
How and where can I declare this function so it’s declared before the plugin?