• Resolved absoluteweb

    (@absoluteweb)


    Hi,

    In your documentation on auto links, you give the example of the term “WordPress”.

    I’m going to use the term “Word” as an example, which will unfortunately be identified in the word WordPress.

    Is there a filter that would allow me to use a regular expression to detect terms in the content (word surrounded by spaces, word at the beginning of a line, word followed by punctuation)?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Steve Burge

    (@stevejburge)

    Hi @absoluteweb. Thanks for using TaxoPress. At the moment there is no regular expression feature. The closest we have is ability to skip some terms that are causing issues.

    Thread Starter absoluteweb

    (@absoluteweb)

    Hi,

    Ok, I deal with the problem by filtering content with regular expressions of this type to remove links that might be inside a word:

    $pattern_before = '/(?<![>\s])<a[^>]*?class="[^"]*?st_tag[^"]*?"[^>]*?>(.*?)<\/a>/ix';
    $pattern_after = '/<a[^>]*?class="[^"]*?st_tag[^"]*?"[^>]*?>(.*?)<\/a>(?![\s.,;!?<])/ix';
    • This reply was modified 2 months, 3 weeks ago by absoluteweb.
    • This reply was modified 2 months, 3 weeks ago by absoluteweb.
    Plugin Author Steve Burge

    (@stevejburge)

    That’s good to hear you fixed it. Thanks, @absoluteweb

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.