Support » Plugin: Transposh WordPress Translation » This function does some ad replacement for transposh benefit

  • Resolved bycomplex


    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 topic was modified 8 months, 2 weeks ago by  Jan Dembowski.
Viewing 16 replies (of 16 total)
  • Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Plugin Review Team Rep

    As annoying as this is? It’s not against the guidelines.

    It would be better if the Adsense code was in the premium version only, but it’s only used by the premium version after you opt in, so technically it’s in compliance.

    As for the kind of weird upgrade notice and the lack of disclosure about ads? Hey, if you don’t like it, don’t pay them! But. Since there is an upgrade offer in the free version, the review here is also permitted.

    I’m closing this topic. If you want to file a complaint, email but bear in mind, we’re likely to tell you that a bad review is the right response and don’t use the plugin if you don’t like it.

    (Personally, I would disclose as clearly as possible the Adsense stuff. I’d actually remove it since if someone uses this on a site Google hates, it could cause you to lose your own account. I say that as someone who had to remove a domain from Adsense.)

Viewing 16 replies (of 16 total)
  • The topic ‘This function does some ad replacement for transposh benefit’ is closed to new replies.