Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: populate_network_meta

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
1294
1295      /**
1296       * Filters meta for a network on creation.
1297       *
1298       * @since 3.7.0
1299       *
1300       * @param array $sitemeta   Associative array of network meta keys and values to be inserted.
1301       * @param int   $network_id ID of network to populate.
1302       */
1303      $sitemeta = apply_filters( 'populate_network_meta', $sitemeta, $network_id );
1304
1305      $insert = '';
1306      foreach ( $sitemeta as $meta_key => $meta_value ) {
1307           if ( is_array( $meta_value ) ) {
1308                $meta_value = serialize( $meta_value );
1309           }
1310           if ( ! empty( $insert ) ) {
1311                $insert .= ', ';
1312           }