Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 572 Bytes

File metadata and controls

20 lines (14 loc) · 572 Bytes

TextformatterImageLinkInterceptor

Processwire Image Link Interceptor Module

@copyright 2015, Roman Seidl
based on HTML Image Interceptor Textformatter @copyright 2013, Martijn Geerts
Licensed under GNU/GPL v2, see LICENSE.TXT

This module simply adds a class to all links that contain images as the first child.

Thus the following:

  <a href="/">
    <img src="/site/assets/files/1/hansi.jpg" alt="Hansi">
  </a>

Should be filtered to be:

  <a class="imglink" href="/">
    <img src="/site/assets/files/1/hansi.jpg" alt="Hansi">
  </a>