oembed_result

過濾鉤子
apply_filters( 'oembed_result', _wp_oembed_get_object()

oembed_result: 這是一個過濾鉤子,允許開發者修改oEmbed請求的結果。oEmbed請求的結果是用於嵌入請求中指定的URL內容的HTML程式碼。這個鉤子可以用來修改oEmbed請求的結果。

這個過濾器在wp-includes/class-wp-oembed.php中有記錄。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$data->html = apply_filters( 'oembed_result', _wp_oembed_get_object()->data2html( (object) $data, $url ), $url, $args );
$data->html = apply_filters( 'oembed_result', _wp_oembed_get_object()->data2html( (object) $data, $url ), $url, $args );
$data->html = apply_filters( 'oembed_result', _wp_oembed_get_object()->data2html( (object) $data, $url ), $url, $args );

常見問題

FAQs
檢視更多 >