tumblr hit counter
'; $str_after = ''; if((is_singular())||(is_home())||(is_archive())) { return $str_before.$content.$str_after; } else { return $content; } } else { return $content; } } // Content function with user defined filter add_action( 'template_redirect', 'ata_content_prepare_filter' ); function ata_content_prepare_filter() { $ata_settings = ata_read_options(); $priority = isset ( $ata_settings['content_filter_priority'] ) ? $ata_settings['content_filter_priority'] : 10; add_filter( 'the_content', 'ata_content', $priority ); } function ata_content($content) { $ata_settings = ata_read_options(); if((is_singular())||(is_home())||(is_archive())) { $str_before = ''; $str_after = ''; if (is_singular()) { if($ata_settings['content_addhtmlbefore']) { $str_before .= stripslashes($ata_settings['content_htmlbefore']); } if($ata_settings['content_addhtmlafter']) { $str_after .= stripslashes($ata_settings['content_htmlafter']); } if($ata_settings['content_addhtmlbeforeS']) { $str_before .= stripslashes($ata_settings['content_htmlbeforeS']); } if($ata_settings['content_addhtmlafterS']) { $str_after .= stripslashes($ata_settings['content_htmlafterS']); } } elseif ((is_home())||(is_archive())) { if($ata_settings['content_addhtmlbefore']) { $str_before .= stripslashes($ata_settings['content_htmlbefore']); } if($ata_settings['content_addhtmlafter']) { $str_after .= stripslashes($ata_settings['content_htmlafter']); } } return $str_before.$content.$str_after; } else { return $content; } } // Feed function add_filter('the_excerpt_rss', 'ald_ata_rss',99999999); add_filter('the_content_feed', 'ald_ata_rss',99999999); function ald_ata_rss($content) { $ata_settings = ata_read_options(); if( ($ata_settings['feed_addhtmlbefore']) || ($ata_settings['feed_addhtmlafter']) || ($ata_settings['feed_addtitle']) || ($ata_settings['feed_addcopyright']) || ($ata_settings['addcredit']) ) { $creditline = '
Feed enhanced by the Add To All Plugin by Ajay D\'Souza'; $str_before =''; $str_after ='
'; if($ata_settings['feed_addhtmlbefore']) { $str_before .= stripslashes($ata_settings['feed_htmlbefore']); $str_before .= '
'; } if($ata_settings['feed_addhtmlafter']) { $str_after .= stripslashes($ata_settings['feed_htmlafter']); $str_after .= '
'; } if($ata_settings['feed_addtitle']) { $str_after .= ''.the_title('','',false).' was first posted on '.get_the_time('F j, Y').' at '.get_the_time('g:i a').'.'; $str_after .= '
'; } if($ata_settings['feed_addcopyright']) { $str_after .= stripslashes($ata_settings['feed_copyrightnotice']); $str_after .= '
'; } if($ata_settings['addcredit']) { $str_after .= $creditline; $str_after .= '
'; } return $str_before.$content.$str_after; } else { return $content; } } // Header function add_action('wp_head','ald_ata_header'); function ald_ata_header() { global $wpdb, $post, $single; $ata_settings = ata_read_options(); $ata_other = stripslashes($ata_settings['head_other']); $ata_head_CSS = stripslashes($ata_settings['head_CSS']); $ata_tp_tynt_id = stripslashes($ata_settings['tp_tynt_id']); // Add CSS to header if ($ata_head_CSS != '') { echo ''; } // Add Tynt code to Header if ($ata_tp_tynt_id != '') { ?> '.get_option('blogname').'". '; $copyrightnotice .= __('Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement. Please contact me at ','ald_ata_plugin'); $copyrightnotice .= get_option('admin_email'); $ga_url = parse_url(get_option('home'),PHP_URL_HOST); $ata_settings = Array ( 'addcredit' => false, // Show credits? // Content options 'content_htmlbefore' => '', // HTML you want added to the content 'content_htmlafter' => '', // HTML you want added to the content 'content_addhtmlbefore' => false, // Add HTML to content? 'content_addhtmlafter' => false, // Add HTML to content? 'content_htmlbeforeS' => '', // HTML you want added to the content on single pages only 'content_htmlafterS' => '', // HTML you want added to the content on single pages only 'content_addhtmlbeforeS' => false, // Add HTML to content on single pages? 'content_addhtmlafterS' => false, // Add HTML to content on single pages? 'content_filter_priority' => 999, // Content priority // Feed options 'feed_htmlbefore' => '', // HTML you want added to the feed 'feed_htmlafter' => '', // HTML you want added to the feed 'feed_copyrightnotice' => $copyrightnotice, // Copyright Notice 'feed_emailaddress' => get_option('admin_email'), // Admin Email 'feed_addhtmlbefore' => false, // Add HTML to Feed? 'feed_addhtmlafter' => false, // Add HTML to Feed? 'feed_addtitle' => true, // Add title of the post? 'feed_addcopyright' => true, // Add copyright notice? // 3rd party options 'tp_sc_project' => '', // StatCounter Project ID 'tp_sc_security' => '', // StatCounter Security String 'tp_ga_uacct' => '', // Google Analytics Web Property ID 'tp_ga_domain' => $ga_url, // Google Analytics _setDomainName value 'tp_kontera_ID' => '', // Kontera Publisher ID 'tp_kontera_linkcolor' => '', // Kontera link color 'tp_kontera_addZT' => '', // Kontera Add zone tags 'tp_tynt_id' => '', // Tynt ID // Footer options 'ft_other' => '', // For any other code // Header options 'head_CSS' => '', // CSS to add to header (do not wrap with