I am creating a plugin where I would like to add a filter that runs through the list of links looking for a specific attribute value, ie href, title or rel.
I would then like to add a javascript onlick event ie onclick="somefunction();"
how would I achieve this?
I know I can use add_filter('the_content', 'otherfunction', 99); to filter through post content, is there something similar for the links?
help appreciated.