• Resolved joho68

    (@joho68)


    It seems like there’s no way to catch a failing URL (4xx) in weblog_ping() used to notify remote sites (“Update Services”)?

    (Or for that matter, generic_ping(), which could also call a filter with URLs that failed.)

    Did I miss something, or is this the one function in WordPress that doesn’t have at least one filter attached to it? ??

    • This topic was modified 3 years, 11 months ago by joho68. Reason: Added generic_ping()
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You can use the ‘http_response’ filter to check the ping request response and do something, but it wouldn’t do any good to alter the response since you cannot check the response farther up the call stack. To affect some other process you’d have to set some global value or static property for later use.

    A lot of other requests go through this filter so it’d be best to add just before doing a ping, then remove right afterwards.

    Thread Starter joho68

    (@joho68)

    Thanks for the response. Well, I needed to have a way to handle possible errors during the ping process (when run by WordPress), but I’ll figure out another way to do what I wanted to do.

    I was just surprised not to find a hook/filter for this ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Catching weblog_ping() errors’ is closed to new replies.