Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Steven Vachon

    (@prometh)

    Replace this:

    $linkPattern = "/(<\s?a\shref\s?=[\s\"\'])($blogroll\/?)([\s\"\']{1,3})([^>]+)?(>)([^<]+)(<\/a>)/i";

    with this:

    $linkPattern = "/(<\s*?a\b[^>]*?\bhref\s*?=[\s\"\'])($blogroll\/?)([\s\"\']{1,3})([^>]+)?(>)([^<]+)(<\/a>)/i";

    and it’ll work

    Thread Starter Steven Vachon

    (@prometh)

    By the way, the problem wasn’t outlined properly in my first post because I’d forgotten to place the code within WordPress’ backticks.

    Basically, the problem was that if you had any attributes—like an id—the regex pattern would not match.

    So, this would work:

    <a href="asdf.html" id="something">link</a>

    …but this would not:

    <a id="something" href="asdf.html">link</a>

    Fixed in version 1.2. Thanks for the help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Auto XFN-ify] Doesn’t work if link has an ID’ is closed to new replies.