WordPress.org

Ready to get started?Download WordPress

Forums

send_headers hook, request status and HTTP headers (1 post)

  1. Gawain Lynch
    Member
    Posted 2 years ago #

    In my plugin I'm working with the send_headers hook and am beating my head against a wall trying to effectively trap the HTTP response sent *back to the requestor*.

    Looking at WP->send_headers the status is captured, but then passed to status_header() but not included in $headers, hence not in the returned array of data... But I may just be going pie-eyed from frustration and general fatigue :-D

    So my question is, how does a meer mortal capture the 200, 301 & 404s that are sent back to the requestor so my plugin function that is hooked in can act conditionally on the result?

    Many thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic