最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

What is the $context in remove_meta_box function?

programmeradmin0浏览0评论

I use the remove_meta_box function to remove the area I don`t want to display in the dashboard.

But I can`t figure out what is the $context ?

remove_meta_box( $id, $page, $context )

$context has three string to choose side , normal , advanced

what is difference among these three??

I use the remove_meta_box function to remove the area I don`t want to display in the dashboard.

But I can`t figure out what is the $context ?

remove_meta_box( $id, $page, $context )

$context has three string to choose side , normal , advanced

what is difference among these three??

Share Improve this question edited Sep 2, 2019 at 11:03 Krzysiek Dróżdż 25.6k9 gold badges53 silver badges74 bronze badges asked Sep 2, 2019 at 10:49 cindycindy 1059 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

The context within the screen IS where the boxes should display. Available contexts vary from screen to screen. Post edit screen contexts include 'normal', 'side', and 'advanced'. Comments screen contexts include 'normal' and 'side'. Menus meta boxes (accordion sections) all use the 'side' context. Global default is 'advanced'.

So it is the place you are removing the box from.

https://codex.wordpress/Function_Reference/remove_meta_box

发布评论

评论列表(0)

  1. 暂无评论