Fernando Tessmann

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Map Widget missing _wpnonce parameter #541350

    Fernando Tessmann
    Free User
    Post count: 3

    Hi Stiofan,

    Thank you for your reply.

    I agree my solution was not the best. The correct is to use HTTP header for this, leaving to the site decide if they are going to cache or not the nounce header (since all the WP (PHP) requests should have the nounce header, I don’t see a problem, it’s a standard).

    About the reason that my client needed it, is because he wanted to hide some posts based on some specific rule – a rule only used for logged-in users.

    My code worked great on these 3 filters:
    – geodir_main_query_posts_where
    – geodir_filter_widget_listings_where
    – geodir_rest_markers_query_where

    But no on the geodir_rest_posts_clauses_where filter because there I can’t see which user is logged in.

    If I can suggest something, would be to add the header on this Ajax request. You would keep the WordPress standards and the request would behave like all the other PHP requests, leaving the cache system to decide if the cache should consider or not the nounce header.

    I hope all this makes sense.

    Thank you so much for your plugin and time.

    Best,
    Fernando

Viewing 1 post (of 1 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount