Source View: welcome_panel

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
114      $option = get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
115      // 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner
116      $hide = 0 == $option || ( 2 == $option && wp_get_current_user()->user_email != get_option( 'admin_email' ) );
117      if ( $hide )
118           $classes .= ' hidden'; ?>
119
120       <div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
121            <?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
122           <a class="welcome-panel-close" href="<?php echo esc_url( admin_url( '?welcome=0' ) ); ?>"><?php _e( 'Dismiss' ); ?></a>
123           <?php do_action( 'welcome_panel' ); ?>
124      </div>
125 <?php endif; ?>
126
127 <div id="dashboard-widgets-wrap">
128
129 <?php wp_dashboard(); ?>
130
131 <div class="clear"></div>
132 </div><!-- dashboard-widgets-wrap -->