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

This hook occurs 2 times in this file.

Line Code
270       */
271      public function customize_controls_init() {
272           /** This action is documented in wp-admin/includes/ajax-actions.php */
273           do_action( 'load-widgets.php' );
274
275           /** This action is documented in wp-admin/includes/ajax-actions.php */
276           do_action( 'widgets.php' );
277
278           /** This action is documented in wp-admin/widgets.php */
279           do_action( 'sidebar_admin_setup' );
280      }
281
282      /**
283       * Ensure widgets are available for all types of previews.
284       *
285       * When in preview, hook to 'customize_register' for settings
286       * after WordPress is loaded so that all filters have been
287       * initialized (e.g. Widget Visibility).
288       *
 
Line Code
1319           }
1320
1321           /** This action is documented in wp-admin/includes/ajax-actions.php */
1322           do_action( 'load-widgets.php' );
1323
1324           /** This action is documented in wp-admin/includes/ajax-actions.php */
1325           do_action( 'widgets.php' );
1326
1327           /** This action is documented in wp-admin/widgets.php */
1328           do_action( 'sidebar_admin_setup' );
1329
1330           $widget_id = $this->get_post_value( 'widget-id' );
1331           $parsed_id = $this->parse_widget_id( $widget_id );
1332           $id_base = $parsed_id['id_base'];
1333
1334           $is_updating_widget_template = (
1335                isset( $_POST[ 'widget-' . $id_base ] )
1336                &&
1337                is_array( $_POST[ 'widget-' . $id_base ] )