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 | $help = ' |
37 | <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> |
38 | <p>' . __('The Available Widgets section contains all the widgets you can choose from. Once you drag a widget into a sidebar, it will open to allow you to configure its settings. When you are happy with the widget settings, click the Save button and the widget will go live on your site. If you click Delete, it will remove the widget.') . '</p> |
39 | <p>' . __('If you want to remove the widget but save its setting for possible future use, just drag it into the Inactive Widgets area. You can add them back anytime from there. This is especially helpful when you switch to a theme with fewer or different widget areas.') . '</p> |
40 | <p>' . __('Widgets may be used multiple times. You can give each widget a title, to display on your site, but it’s not required.') . '</p> |