- Timestamp:
- 07/29/2011 01:04:31 PM (10 months ago)
- File:
-
- 1 edited
-
trunk/WordPress/plugin/transposh/core/parser.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/core/parser.php
r643 r644 577 577 */ 578 578 function do_ad_switch() { 579 foreach ($this->html->noise as $key => $value) { 580 if (strpos($value, 'google_ad_client') !== false) { 581 $publoc = strpos($value, 'pub-'); 582 $sufloc = strpos($value, '"', $publoc); 583 if (!$sufloc) $sufloc = strpos($value, "'", $publoc); 584 echo $publoc . ' ' . $sufloc; 585 if ($publoc && $sufloc) 586 $this->html->noise[$key] = substr($value, 0, $publoc) . 'pub-7523823497771676' . substr($value, $sufloc); 579 if (isset($this->html->noise) && is_array($this->html->noise)) { 580 foreach ($this->html->noise as $key => $value) { 581 if (strpos($value, 'google_ad_client') !== false) { 582 $publoc = strpos($value, 'pub-'); 583 $sufloc = strpos($value, '"', $publoc); 584 if (!$sufloc) $sufloc = strpos($value, "'", $publoc); 585 echo $publoc . ' ' . $sufloc; 586 if ($publoc && $sufloc) 587 $this->html->noise[$key] = substr($value, 0, $publoc) . 'pub-7523823497771676' . substr($value, $sufloc); 588 } 587 589 } 588 590 } … … 714 716 // fix urls... 715 717 foreach ($this->atags as $e) { 716 if ($e->href) $e->href = call_user_func_array($this->url_rewrite_func, array($e->href)); 718 if ($e->href) 719 $e->href = call_user_func_array($this->url_rewrite_func, array($e->href)); 717 720 } 718 721 foreach ($this->otags as $e) { 719 if ($e->value) $e->value = call_user_func_array($this->url_rewrite_func, array($e->value)); 722 if ($e->value) 723 $e->value = call_user_func_array($this->url_rewrite_func, array($e->value)); 720 724 } 721 725
Note: See TracChangeset
for help on using the changeset viewer.
