do_meta_boxes

動作鉤子
do_action( 'do_meta_boxes', $post_type, 'normal', $post )
引數
  • (string) $post_type Post type of the post on Edit Post screen, 'link' on Edit Link screen, 'dashboard' on Dashboard screen.
    Required:
  • (string) $context Meta box context. Possible values include 'normal', 'advanced', 'side'.
    Required:
  • (WP_Post|object|string) $post Post object on Edit Post screen, link object on Edit Link screen, an empty string on Dashboard screen.
    Required:
定義位置
相關勾子
add_meta_boxeshidden_meta_boxesadd_meta_boxes_linkadd_meta_boxes_commentdefault_hidden_meta_boxes
相關方法
do_meta_boxesadd_meta_boxmeta_box_prefsget_hidden_meta_boxesremove_meta_boxpost_slug_meta_box
引入
3.0.0
棄用
-

do_meta_boxes: 這個動作用於在特定文章型別的編輯螢幕上新增元框。它通常用於在編輯螢幕上新增自定義欄位或其他資訊。

在新增後設資料框後觸發。

對每個預設的元組框的上下文觸發一次:normal、advanced和side。

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

常見問題

FAQs
檢視更多 >