WordPress.org

Support

Support » Plugins and Hacks » Adding URL suffixes to YARPP links

Adding URL suffixes to YARPP links

  • Greetings.

    It seems the $url_sufix and $url_prefix are ignored if the content for the upprev box is obtained from YARPP.

    It’d be great if support for that could be included in the next release.

    I added the following lines of code starting on line 462 of upprev.php, right after the line 461: $value .= $yarpp_posts;

    462     $dom = new DOMDocument;
    463     $dom->loadHTML($value);
    464     foreach ($dom->GetElementsByTagName('a') as $node) {
    465          if($node->hasAttribute('href')) {
    466               $node->setAttribute('href', $node->getAttribute('href')."".$url_sufix);
    467          }
    468     }
    469     $value = $dom->saveHtml();

    http://wordpress.org/extend/plugins/upprev/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adding URL suffixes to YARPP links’ is closed to new replies.