$attr)
{
$pre_pattern[] = '/'.$attr.'/';
$pretags[$i] = ' '.$attr;
}
foreach($posttags as $i => $attr)
{
$post_pattern[] = '/[^_]'.$attr.'/';
$posttags[$i] = ' '.$attr;
}
$temp_string = preg_replace( $pre_pattern, $posttags, $string);
if (strpos($temp_string, "twscreen_name") != false) {
$temp_string = str_replace('twscreen_name', 'twscreenname', $temp_string);
}
if (strpos($temp_string, "fblikeshow_faces") != false) {
$temp_string = str_replace('fblikeshow_faces', 'fblikeshowfaces', $temp_string);
}
$new_temp_string = wp_kses($temp_string, $mytags);
// Add in our %s so that the url and title get added properly
if (!preg_match('/(]+>)/i', $string, $matches)) {
$new_string = preg_replace( $post_pattern, $pretags, $new_temp_string);
$new_string = substr_replace($new_string, $customstyles, 4, 0);
}
else {
$new_string = substr_replace($new_temp_string, $customstyles, 4, 0);
}
if (strpos($new_string, "tw:screenname") != false) {
$new_string = str_replace('tw:screenname', 'tw:screen_name', $new_string);
}
if (strpos($new_string, "fb:like:showfaces") != false) {
$new_string = str_replace('fb:like:showfaces', 'fb:like:show_faces', $new_string);
}
return $new_string;
}
/**
* Add this version notification message
* @param int $atversion_update_status
* @param int $atversion
*/
function _addthis_version_notification($atversion_update_status, $atversion)
{
//Fresh install Scenario. ie., atversion = 300 without reverting back.
if($atversion_update_status == ADDTHIS_ATVERSION_AUTO_UPDATE && $atversion >= ADDTHIS_ATVERSION) {
return;
}
$imgLocationBase = apply_filters( 'addthis_files_uri', plugins_url( '' , basename(dirname(__FILE__)))) . '/addthis/img/' ;
ob_start();
// In the automatic update by the system the $atversion_update_status is 0
// On subsequent update using notification link the $atversion_update_status = -1
// In both cases display the revert link
if ($atversion_update_status == ADDTHIS_ATVERSION_AUTO_UPDATE || $atversion_update_status == ADDTHIS_ATVERSION_MANUAL_UPDATE) {
?>