Support » Plugin: Related Posts Thumbnails Plugin for WordPress » How can I filter plugin output?

  • Resolved jacky_K

    (@jacky_k)


    Hey. I need to add the attribute data-bgset = “” for lazy loading. How can I filter plugin output? For example add_filter (‘get_related_posts_thumbnails’ …… ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Asad Shahbaz

    (@artisticasad)

    Hi,

    Thank you for using our Related Posts Thumbnails. There isn’t any filter to support your current scenario.
    Can you please let me know where would you like to add data-bgset attribute.

    We will provide the filter in the next update.

    Cheers ✌

    For lazyLoad I need this code:
    <div class="relpost-block-single-image" alt="Chevrolet Aveo" style=" background: transparent url(https://site.com/wp-content/uploads/2012/12/chevrolet-aveo-150x150.jpg) no-repeat scroll 0% 0%; width: 150px; height: 150px; "></div>
    replace with one with parameter data-bgset
    <div class="relpost-block-single-image" alt="Chevrolet Aveo" data-bgset="https://site.com/wp-content/uploads/2012/12/chevrolet-aveo-150x150.jpg"></div>
    I wanted to use the function in my snippet
    preg_match('/background-image\s*:\s*(?<attr>\s*url\s*\((?<url>[^)]+)\))\s*;?/is', $input_line, $url);

    Plugin Support Asad Shahbaz

    (@artisticasad)

    We have just added a new filter for this purpose and it will be available in the next update soon.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I filter plugin output?’ is closed to new replies.