WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] add filter to blogroll to modify links (2 posts)

  1. thydzik
    Member
    Posted 2 years ago #

    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.

  2. thydzik
    Member
    Posted 2 years ago #

    so going through some blogroll plugins, looks like the following does what I am after;

    add_filter('get_bookmarks', 'otherfunction', 99);

Topic Closed

This topic has been closed to new replies.

About this Topic