WordPress.org

Ready to get started?Download WordPress

Forums

[Democracy Poll] Get rid of the letter 'n' in polls (1 post)

  1. Ahmed Hamouda
    Member
    Posted 3 years ago #

    Hola wordpressers :)
    When I was browsing the forums here I found that some people asked about this problem and got no answer so am putting the answer here..
    I also had the same problem so I browsed the code searching for an answer and I found a simple solution am not saying am not pretending to appear as a PHP expert so am putting the fix here if anyone face the problem and looking for a solution or if a PHP expert see the solution and says if its oki to do it or I screwed the plugin :P

    The Problem: A weird N letter appears before the poll if you inserted it in a post using the code {democracy:#ID}

    The Solution: You open the file democracy.php and try to find the line 331 which should be:
    return preg_replace('/{democracy[\w\W\s^}]*?}/', '\n<div>\</div>', $content);

    and remove the \n before the <div>
    The results:
    return preg_replace('/{democracy[\w\W\s^}]*?}/', '<div>\</div>', $content);

    And the N should disappear..

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by Ahmed Hamouda
  • This topic is not a support question
  • WordPress version: 3.0.1