Welcome, visitor! Log in
 

Source View: default_hidden_meta_boxes

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1053
1054      $hidden = get_user_option( "metaboxhidden_{$screen->id}" );
1055
1056      // Hide slug boxes by default
1057      if ( !is_array( $hidden ) ) {
1058           if ( 'post' == $screen->base || 'page' == $screen->base )
1059                $hidden = array('slugdiv', 'trackbacksdiv', 'postcustom', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');
1060           else
1061                $hidden = array( 'slugdiv' );
1062           $hidden = apply_filters('default_hidden_meta_boxes', $hidden, $screen);
1063      }
1064
1065      return $hidden;
1066 }
1067
1068 /**
1069  * Add a new section to a settings page.
1070  *
1071  * Part of the Settings API. Use this to define new settings sections for an admin page.