add_inline_data

動作鉤子
do_action( 'add_inline_data', $post, $post_type_object )
引數
  • (WP_Post) $post The current post object.
    Required:
  • (WP_Post_Type) $post_type_object The current post's post type object.
    Required:
定義位置
相關勾子
add_linkadd_signup_metaadmin_initwp_normalize_site_datawp_read_image_metadata
相關方法
get_inline_datawp_add_inline_stylewp_add_inline_scriptadd_metadataget_file_dataadd_site_meta
引入
4.9.8
棄用
-

add_inline_data是一個動作鉤子,允許外掛向頁面或文章新增內聯資料,如樣式或指令碼。這個鉤子通常用於向網站的編輯器或前端新增自定義樣式或指令碼。

在輸出文章和頁面的內聯編輯器欄位後啟動。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'add_inline_data', $post, $post_type_object );
do_action( 'add_inline_data', $post, $post_type_object );
do_action( 'add_inline_data', $post, $post_type_object );

常見問題

FAQs
檢視更多 >