Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: sidebar_admin_setup

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.

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
28 if ( 'on' == $widgets_access ) {
29      add_filter( 'admin_body_class', 'wp_widgets_access_body_class' );
30 } else {
31      wp_enqueue_script('admin-widgets');
32
33      if ( wp_is_mobile() )
34           wp_enqueue_script( 'jquery-touch-punch' );
35 }
36
37 do_action( 'sidebar_admin_setup' );
38
39 $title = __( 'Widgets' );
40 $parent_file = 'themes.php';
41
42 get_current_screen()->add_help_tab( array(
43 'id'          => 'overview',
44 'title'          => __('Overview'),
45 'content'     =>
46      '<p>' . __('Widgets are independent sections of content that can be placed into any widgetized area provided by your theme (commonly called sidebars). To populate your sidebars/widget areas with individual widgets, drag and drop the title bars into the desired area. By default, only the first widget area is expanded. To populate additional widget areas, click on their title bars to expand them.') . '</p>