wp-includes/embed.php

WP檔案 38
oEmbed API: Top-level oEmbed functionality
函式/鉤子名 描述
the_embed_site_title (函式) the_embed_site_title – 這個WordPress函式是用來輸出當前嵌入網站的標題。它通常被用在一個嵌入式模板中,以顯示被嵌入的網站的標題。
print_embed_styles (函式) print_embed_styles: 這個動作用來列印從外部來源嵌入內容到WordPress所需的樣式。
print_embed_sharing_dialog (函式) print_embed_sharing_dialog: 這個動作用來列印一個對話方塊,用於分享一個嵌入的文章。
print_embed_sharing_button (函式) print_embed_sharing_button: 這個動作用來列印一個用於分享嵌入文章的按鈕。
print_embed_scripts (函式) print_embed_scripts: 這個動作用來列印從外部來源嵌入內容到WordPress所需的指令碼。
print_embed_comments_button (函式) print_embed_comments_button: 這個動作用來列印一個按鈕,用於在一個嵌入的文章上發表評論。
get_post_embed_url (函式) get_post_embed_url函式用於檢索給定文章的嵌入內容的url。它只接受一個引數,即文章的ID。然後可以使用URL使用適當的HTML標記嵌入內容。
get_post_embed_html (函式) get_post_embed_html函式用於檢索文章嵌入內容的html程式碼。它只接受一個引數,即文章的ID: 此函式返回顯示文章嵌入內容所需的HTML程式碼。嵌入的內容可以是從視訊到音訊檔案或社交
get_oembed_response_data_rich (函式) get_oembed_response_data_rich函式用於檢索特定URL的oEmbed響應資料,並格式化資料以用於富媒體嵌入: 這個函式可以用來以一種視覺上吸引人的方式顯示來自其他網站的嵌入內
get_oembed_response_data_for_url (函式) get_oembed_response_data_for_url函式用於檢索特定URL的oEmbed響應資料,並將結果快取起來: 這個函式可以通過避免對oEmbed提供者的不必要的請求來提高效能。
get_oembed_response_data (函式) get_oembed_response_data函式是用來檢索特定URL的oEmbed響應資料的: 這個函式可以用來在WordPress文章或頁面中顯示其他網站的嵌入內容。
get_oembed_endpoint_url (函式) get_oembed_endpoint_url函式用於檢索特定URL的oEmbed端點的URL: 這個函式可以用來將其他網站的內容嵌入到WordPress的文章或頁面中。
enqueue_embed_scripts (函式) enqueue_embed_scripts: 這個函式將在WordPress網站上嵌入媒體所需的指令碼排隊。
_wp_oembed_get_object (函式) _wp_oembed_get_object: 這是一個私有函式,用於檢索指定URL的oEmbed響應資料。它被wp_oembed_get函式呼叫,該函式用於通過提供不同網站的URL來嵌入內容。
_oembed_rest_pre_serve_request (函式) _oembed_rest_pre_serve_request: 這個鉤子用於在REST API請求中的oEmbed響應被提供之前修改它。
_oembed_filter_feed_content (函式) _oembed_filter_feed_content: 這個函式用來過濾feed中oEmbed響應的內容。
_oembed_create_xml (函式) _oembed_create_xml: 此函式用於建立oEmbed響應的XML表示。

常見問題

FAQs
檢視更多 >