Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_initialize_site_args

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

Line Code
672      /**
673       * Filters the arguments for initializing a site.
674       *
675       * @since 5.1.0
676       *
677       * @param array      $args    Arguments to modify the initialization behavior.
678       * @param WP_Site    $site    Site that is being initialized.
679       * @param WP_Network $network Network that the site belongs to.
680       */
681      $args = apply_filters( 'wp_initialize_site_args', $args, $site, $network );
682
683      $orig_installing = wp_installing();
684      if ( ! $orig_installing ) {
685           wp_installing( true );
686      }
687
688      $switch = false;
689      if ( get_current_blog_id() !== $site->id ) {
690           $switch = true;