pingback_useragent

过滤钩子
apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . get_bloginfo( 'version' )
参数
  • (string) $concat_useragent The user agent concatenated with ' -- WordPress/' and the WordPress version.
    Required:
  • (string) $useragent The useragent.
    Required:
  • (string) $pingback_server_url The server URL being linked to.
    Required:
  • (string) $pagelinkedto URL of page linked to.
    Required:
  • (string) $pagelinkedfrom URL of page linked from.
    Required:
定义位置
相关勾子
http_headers_useragentpre_comment_user_agentwp_link_query_argsillegal_user_loginswp_sitemaps_users_entry
相关方法
pingbackdiscover_pingback_server_urixmlrpc_pingback_erroradd_users_pageupdate_usermetado_all_pingbacks
引入
2.9.0
弃用
-

pingback_useragent 是一个钩子,在检查pingback用户代理时被调用。它用于修改用于检查pingbacks的用户代理字符串。

过滤当ping-back一个URL时发送的用户代理。

$client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . get_bloginfo( 'version' ), $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom );

常见问题

FAQs
查看更多 >