wp_widgets_init

Registers all of the default WordPress widgets on startup.

Description

wp_widgets_init(); 

Calls action after all of the WordPress widgets have been registered.


Usage

  1. if ( !function_exists( 'wp_widgets_init' ) ) { 
  2. require_once ABSPATH . WPINC . '/widgets.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_widgets_init(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/widgets.php  
  1. function wp_widgets_init() { 
  2. if ( !is_blog_installed() ) 
  3. return; 
  4.  
  5.  
  6.  
  7.  
  8. if ( get_option( 'link_manager_enabled' ) ) 
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19. /** 
  20. * Fires after all default WordPress widgets have been registered. 
  21. * @since 2.2.0 
  22. */