This function does some ad replacement for transposh benefit
-
Hello,
What’s this code for? What does it do?In transposh-translation-filter-for-wordpress/core/parser.php
line 657 – 678/**
* This function does some ad replacement for transposh benefit
*/
function do_ad_switch() {
if (isset($this->html->noise) && is_array($this->html->noise)) {
foreach ($this->html->noise as $key => $value) {
if (strpos($value, ‘google_ad_client’) !== false) {
$publoc = strpos($value, ‘pub-‘);
$sufloc = strpos($value, ‘”‘, $publoc);
if (!$sufloc)
$sufloc = strpos($value, “‘”, $publoc);
echo $publoc . ‘ ‘ . $sufloc;
if ($publoc && $sufloc)
$this->html->noise[$key] = substr($value, 0, $publoc) . ‘pub-752……….76’ . substr($value, $sufloc);
}
}
}
// INS TAGS
foreach ($this->html->find(‘ins’) as $e) {
$e->{‘data-ad-client’} = ‘ca-pub-752……..76’;
}
}
- ‘This function does some ad replacement for transposh benefit’ konusu yeni yanıtlara kapalı.