• There is a filter called photonic_custom_sort_photos but it only has the list of photos and the supplier. I suggest adding another filter that sends the list of photos and the shortcode attributes, which will allow the user to declare extra attributes. In my case I can generate limits and show the gallery in batches.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    What type of “extra attributes”? The plugin already supports showing the gallery in batches using the count and more parameters.

    Thread Starter Sebastian Echeverry

    (@sebaxtian)

    This is an example of what I’m doing right now. The batches in my case doesn’t have always the same size.

    https://www.sebaxtian.com/archivos/200

    Plugin Author Sayontan Sinha

    (@sayontan)

    Sorry, but that doesn’t work the way you are thinking, because Google’s API doesn’t support sorting and pagination natively (unlike Flickr or SmugMug). E.g., in Google, if your album had more than 100 photos, you wouldn’t be able to use limits=97,106 to fetch those photos. While, in your specific case you might not have more than 100 photos in an album, support requests for such features become harder for me to support as a developer.

    Also, Google’s pageSize parameter is not reliable – as per its documentation, it will not always return the number of photos you wish to see.

    My suggestion to you would be to use CSS to filter this out by gallery. For each gallery you can add a custom class via the shortcode parameter custom_classes. You can use this to remove the children of the gallery that you don’t wish to see. E.g. you could add a class like remove-after-19, and then set to to remove all figure elements with the nth-child selector after the 19th child.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add extra filter to allow custom actions over photo list’ is closed to new replies.