Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: dynamic_sidebar_after

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
629                }
630           }
631      }
632
633      $sidebars_widgets = wp_get_sidebars_widgets();
634      if ( empty( $wp_registered_sidebars[ $index ] ) || empty( $sidebars_widgets[ $index ] ) || ! is_array( $sidebars_widgets[ $index ] ) ) {
635           /** This action is documented in wp-includes/widget.php */
636           do_action( 'dynamic_sidebar_before', $index, false );
637           /** This action is documented in wp-includes/widget.php */
638           do_action( 'dynamic_sidebar_after',  $index, false );
639           /** This filter is documented in wp-includes/widget.php */
640           return apply_filters( 'dynamic_sidebar_has_widgets', false, $index );
641      }
642
643      /**
644       * Fires before widgets are rendered in a dynamic sidebar.
645       *
646       * Note: The action also fires for empty sidebars, and on both the front end
647       * and back end, including the Inactive Widgets sidebar on the Widgets screen.
 
Line Code
751       * Note: The action also fires for empty sidebars, and on both the front end
752       * and back end, including the Inactive Widgets sidebar on the Widgets screen.
753       *
754       * @since 3.9.0
755       *
756       * @param int|string $index       Index, name, or ID of the dynamic sidebar.
757       * @param bool       $has_widgets Whether the sidebar is populated with widgets.
758       *                                Default true.
759       */
760      do_action( 'dynamic_sidebar_after', $index, true );
761
762      /**
763       * Filters whether a sidebar has widgets.
764       *
765       * Note: The filter is also evaluated for empty sidebars, and on both the front end
766       * and back end, including the Inactive Widgets sidebar on the Widgets screen.
767       *
768       * @since 3.9.0
769       *