WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
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.
Line | Code |
---|---|
22 | $widgets_access = 'on' == $_GET['widgets-access'] ? 'on' : 'off'; |
23 | set_user_setting( 'widgets_access', $widgets_access ); |
24 | } |
25 |
|
26 | if ( 'on' == $widgets_access ) |
27 | add_filter( 'admin_body_class', create_function('', '{return " widgets_access ";}') ); |
28 | else |
29 | wp_enqueue_script('admin-widgets'); |
30 |
|
31 | do_action( 'sidebar_admin_setup' ); |
32 |
|
33 | $title = __( 'Widgets' ); |
34 | $parent_file = 'themes.php'; |
35 |
|
36 | // register the inactive_widgets area as sidebar |
37 | register_sidebar(array( |
38 | 'name' => __('Inactive Widgets'), |
39 | 'id' => 'wp_inactive_widgets', |
40 | 'description' => '', |