Favicache

Description
Favicache is a Wordpress plugin that retrieves and stores favicons in a local cache. This makes for faster page load times and lessens the strain on the server where the favicon was originally retrieved from.
Installation
- Download
favicache.zip. - Upload
favicache.php, thefavicache/directory and it's contents to/wp-content/plugins/. - Ensure the
favicache/folder is writable.1 - Activate the Favicache plugin from the Plugins section in Wordpress.
Code
When the plugin is activated and you begin to add/edit links, the favicons are getting stored in the favicache/ directory. However the plugin does not modify the wp_list_bookmarks()2 function so you need to replace it with favicache_wp_list_bookmarks() which shares the same function attributes. The following code snippet is an example of Favicache in a Wordpress template. Notice the function_exists() function call on line 3. This code is to allow for seamless switching from Favicache being active and not.
- PHP
- <?php
- if (function_exists('favicache_wp_list_bookmarks')) { favicache_wp_list_bookmarks(); }
- else { wp_list_bookmarks(); }
- ?>
In addition to outputting bookmarks with the custom Favicache function, you can style the label that gets displayed next to each favicon.
- CSS
- span.favicon_label { position: relative; top: -3px; left: 3px; }
Features
- Caches the
favicon.icofile from the root of the domain. - Caches the
favicon.icofile from the<link type="icon" href="http://domain/favicon.ico" />tag.
Technical Specs
- Version: 1.0a
- Last Updated: April 5, 2008
- Wordpress Compatibility: 2.5, 2.3, 2.2, 2.1
- PHP Compatibility: 5.0, 4.0
- Changing File Permissions « WordPress Codex
- In previous versions of Wordpress (prior to 2.5),
wp_list_bookmarks()used to beget_links_list()orget_links(). Both functions are now deprecated.