• Resolved cgzaal

    (@cgzaal)


    Hi, I’m using your gallery plugin (big fan).

    For some reason I want to tag some images via css (with a red dot), so I need an extra class to be set in the gallery. I managed to do this adding a filter to the $attributes variable, so I could add an id to the <figure class=”mgl-item”>.

    Could you add an apply-filters line to the $attributes variable (in the build_next_cell function)? This would be really cool!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    In core.php, if I do this:

    $attributes = $this->build_inline_attributes( $id, $data );
    $attributes = apply_filters( 'mgl_attributes', $attributes, $id, $data );
    if ( !empty( $attributes ) ) {
    	$attributes = ' ' . $attributes;
    }

    Does this work for you? ??

    Thread Starter cgzaal

    (@cgzaal)

    Hi Jordy, that would be great! –Chris

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘request: apply_filter for $attributes’ is closed to new replies.