Theme Review Team Begins Phasing Out Favicon Support

One of the main features in WordPress 4.3 are Site Icons. A Site Icon is an image that represents a website across multiple platforms and replaces Favicons. With Site Icons in WordPress core, the WordPress Theme Review team is phasing out the feature in existing themes hosted in the theme directory.

Site Icons in The Customizer
Site Icons in The Customizer

Justin Tadlock, a theme review admin, published a tutorial that explains how to provide a backwards compatible experience.

According to Tadlock, the easiest method is to check if the has_site_icon() function exists. This tells you if the user is running WordPress 4.3 and has the site icon feature available.

You can also check if the user has set up a new icon using the core WordPress feature by using the has_site_icon() conditional tag which returns either TRUE or FALSE.

Here’s some example code from the tutorial you can use to handle the check:

if ( ! function_exists( 'has_site_icon' ) || ! has_site_icon() ) {

    // Output old, custom favicon feature.
}

For additional information, I encourage you to read Stephen Cronin’s post which goes into more detail.

The Theme Review Team enforces a guideline where features added to core are phased out of themes within two major releases. By the time WordPress 4.5 is released, theme authors will be able to remove legacy code without disrupting the user experience.

Would you like to write for WP Tavern? We are always accepting guest posts from the community and are looking for new contributors. Get in touch with us and let's discuss your ideas.

1 Comment


  1. Hooray for this feature – makes my life easier!

    Report

Comments are closed.