or write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
if ( ! class_exists( 'ap_favicon_cove' ) ) {
require_once('class/ap_plugin_ambrapanthera.php');
class ap_favicon_cove extends ap_plugin_AmbraPanthera {
var $pluginname = 'AmberPanther Favicon for WordPress';
var $codename = 'favicon';
var $menutitle = 'AP Favicon';
var $version = '1.10.3.29';
var $hook = array('ap-favicon-general-options','ap-favicon-backend-options','ap-favicon-phpinfo-options');
var $thefile = __FILE__;
var $theicon = '';
var $wpurl = '';
var $homeurl = 'http://www.amberpanther.com/contributions/favicon-for-wordpress/';
var $demourl ='';
var $theX = '';
function ap_favicon_cove(){
$this->theicon = WP_PLUGIN_URL .'/'. str_replace(basename( $this->thefile),"",plugin_basename($this->thefile)) .'images/paw_black_tr.png';
$this->thepaw = WP_PLUGIN_URL .'/'. str_replace(basename( $this->thefile),"",plugin_basename($this->thefile)) .'images/paw_black_tr.png';
$this->theX = WP_PLUGIN_URL .'/'. str_replace(basename( $this->thefile),"",plugin_basename($this->thefile)) .'images/x-missing.png';
}
}
global $ap_favC;
$ap_favC = new ap_favicon_cove();
$ap_favC->ap_plugin_AmbraPanthera();
}
include('options/ap_autoinclude.php');
add_action('wp_head', 'ap_favicon');
if (is_admin())
add_action('admin_head', 'ap_favicon');
function ap_favicon(){
echo ap_favicon_driver();
}
function ap_favicon_driver(){
global $ap_favC;
$options = $ap_favC->ap_get_option('array');
if (!$options['favicon']) return;
$out = '
';
if ($options['favicon']=='root'){
$siteurl = get_bloginfo('url');
if ($options['fav_root_ico'])
$out .= '
';
if ($options['fav_root_png'])
$out .= '
';
if ($options['fav_root_gif'])
$out .= '
';
}
if ($options['favicon']=='custom'){
if ($options['fav_cust_ico'])
$out .= '
';
if ($options['fav_cust_png'])
$out .= '
';
if ($options['fav_cust_gif'])
$out .= '
';
}
$out.='
';
return $out;
}
function ap_favicon_defaults(){
$defaults = array();
return $defaults;
}
?>