oembed_response_data

過濾鉤子
apply_filters( 'oembed_response_data', $data, $post, $width, $height )
引數
  • (array) $data The response data.
    Required:
  • (WP_Post) $post The post object.
    Required:
  • (int) $width The requested width.
    Required:
  • (int) $height The calculated height.
    Required:
定義位置
相關勾子
oembed_resultoembed_request_post_idembed_content_metaoembed_endpoint_urlcomment_on_draft
相關方法
get_oembed_response_dataget_oembed_response_data_richget_oembed_response_data_for_urlwp_oembed_ensure_format_response_to_rsswp_reset_postdata
引入
4.4.0
棄用
-

oembed_response_data: 這是一個過濾器鉤子,允許開發人員修改從oEmbed請求返回的資料。從oEmbed請求返回的資料包括關於嵌入的資訊,如HTML程式碼、寬度和高度。這個鉤子可以用來修改從oEmbed請求返回的資料。

過濾oEmbed響應資料。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'oembed_response_data', $data, $post, $width, $height );
return apply_filters( 'oembed_response_data', $data, $post, $width, $height );
return apply_filters( 'oembed_response_data', $data, $post, $width, $height );

常見問題

FAQs
檢視更多 >