• Hi,
    First of all thanks for a great plugin!

    I needed to customize the html output of the widget but I couldn’t find a future-proof way to do it. So I added some filters.

    Maybe this can make it in to the next update?

    The filters i’ve added are in network-latest-posts.php:

    Line 1197: $html_tags = apply_filters( ‘nlposts_ulist_output’, $html_tags );
    Line 1225: $html_tags = apply_filters( ‘nlposts_olist_output’, $html_tags );
    Line 1253: $html_tags = apply_filters( ‘nlposts_block_output’, $html_tags );
    Line 1281: $html_tags = apply_filters( ‘nlposts_default_output’, $html_tags );

    Bless

    https://wordpress.org/plugins/network-latest-posts/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jose Luis SAYAGO

    (@iluminatus)

    Hello David,

    Thanks for the kind words and for your suggestion, I am currently working on the next major version of Network Latest Posts which includes several improvements, and this is one of them, instead of forcing predefined HTML structures, there will be themes which can be installed similar to the way WordPress themes work.

    However, this is a nice quick improvement I could add as a minor update to NLP. Thank you for the feedback, I will try to add this as soon as possible.

    Cheers,
    José SAYAGO

    Plugin Author Jose Luis SAYAGO

    (@iluminatus)

    Hi again,

    I just wanted to let you know your filters have been added to Network Latest Posts v3.6. Thank you for your contribution.

    I have posted about it here: https://www.facebook.com/lelitenetwork and here: https://twitter.com/laelitetw/status/515508259957256192.

    I also invite you to follow me on FB, G+ or Twitter to stay up to date with improvements made to our plugins.

    Cheers,
    José SAYAGO.

    Thread Starter David Sahlström

    (@david_sa)

    Sweet! Creasy fast too 🙂

    Cheers,
    David

    David–

    Exciting–I edited the nlp code to add my own HTML format, but as you say, it isn’t future-proof. (BTW, I’m also the guy who sent José the patches for honor_sticky and use_pubdate.)

    Can you send me an example of how you use the apply_filters call to wrap your custom HTML around the plugin output, or point me to a good explanation?

    I’m fred.welden at gmail.com.

    Thanks!

    –Fred

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Suggestion (Push request) – Added filters to output function’ is closed to new replies.