Created
February 13, 2015 14:36
-
-
Save cgrymala/1f95156fdef411ca5437 to your computer and use it in GitHub Desktop.
Allow JetPack to control your WordPress site's favicon instead of Genesis
This file contains 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
<?php | |
/** | |
* The 'genesis_pre_load_favicon' filter runs at the beginning of the genesis_load_favicon() function. | |
* If the value returned by that filter ends up as anything except boolean false, Genesis bails on the | |
* genesis_load_favicon() process. | |
*/ | |
add_filter( 'genesis_pre_load_favicon', 'check_jetpack_site_icon_status' ); | |
function check_jetpack_site_icon_status() { | |
/** | |
* If the JetPack module is active and a JetPack Site Icon has been set, | |
* we'll return true. Otherwise, we return false, allowing Genesis | |
* to continue loading its favicon. | |
*/ | |
return function_exists( 'jetpack_has_site_icon' ) && jetpack_has_site_icon(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment