• Resolved Stephan Schmidt

    (@stephan-schmidt)


    If you don’t want to link the image having a target but to open it in the lightbox, in the hw-image-widget/html/hwim-template.php you can change “target” in the line:

    if ( $instance['target_option'] == 'other' ) {
         $a .= ' target="' . esc_attr( $instance['target_name'] ) . '"';

    to “rel”:

    if ( $instance['target_option'] == 'other' ) {
         $a .= ' rel="' . esc_attr( $instance['target_name'] ) . '"';

    and write the image URL plus lightbox in the widget’s Target>Others option field.

    @h?kan Wennerberg: Perhaps you can add an extra field for this? And I hope that’s in your sense.

    Greets, Stephan

    https://www.ads-software.com/plugins/hw-image-widget/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author H?kan Wennerberg

    (@puffythepirateboy)

    Hi Stephan,

    The preferred way to edit the template is to copy the hwim-template.php file to the current themes root and change that version. If the template is available in the theme root, that will be used instead of the default one.

    I will not add a new rel-field by default since I want to keep the UI simple, and I don’t think the overall user has a clue what rel is ?? However, I will probably add a filter like ‘hwim_get_rels’ and show a SELECT with those values if there are any.

    Thread Starter Stephan Schmidt

    (@stephan-schmidt)

    Hi Hakan,

    …”to copy the hwim-template.php file to the current themes root and change that version. If the template is available in the theme root, that will be used instead of the default one.”

    Didn’t know that – thanks!

    And the SELECT filter would be a pretty cool idea.

    Greetings, Stephan

    Plugin Author H?kan Wennerberg

    (@puffythepirateboy)

    I just released version 4.3 that includes the rel-field by default. The list contains the HTML standard rel values + the “Other” option that allow the user to specify the rel attribute manually.

    The value list can be altered using the “hwim_rels” filter (one array param).

    Thread Starter Stephan Schmidt

    (@stephan-schmidt)

    Thanx a lot – that’s great now!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP LightBox 2 compatibility’ is closed to new replies.