WordPress.org

Ready to get started?Download WordPress

Forums

upPrev
Adding URL suffixes to YARPP links (2 posts)

  1. jvaldivia
    Member
    Posted 1 year ago #

    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/

  2. Marcin Pietrzak
    Member
    Plugin Author

    Posted 1 year ago #

    In developer version both prefix and sufix are used with YARPP.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic