• 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?

  • The topic ‘hook on wp_get_attachment_link’ is closed to new replies.