WordPress.org

Ready to get started?Download WordPress

Forums

hook on wp_get_attachment_link (1 post)

  1. jobmeer
    Member
    Posted 2 years ago #

    I like to implement a hook on the wp_get_attachment_link output. The original output in post-template.php looks like

    return apply_filters( 'wp_get_attachment_link', "<a href='$url' title='$post_title'>$link_text</a>", $id, $size, $permalink, $icon, $text );

    my custom output must be:

    return apply_filters( 'wp_get_attachment_link', "$link_text", $id, $size, $permalink, $icon, $text );

    I don't want to change the core files. Does anyone have a idea how i get this hook working?

Topic Closed

This topic has been closed to new replies.

About this Topic