Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_normalize_site_data

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
456
457      /**
458       * Filters passed site data in order to normalize it.
459       *
460       * @since 5.1.0
461       *
462       * @param array $data Associative array of site data passed to the respective function.
463       *                    See {@see wp_insert_site()} for the possibly included data.
464       */
465      $data = apply_filters( 'wp_normalize_site_data', $data );
466
467      $whitelist = array( 'domain', 'path', 'network_id', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' );
468      $data      = array_intersect_key( wp_parse_args( $data, $defaults ), array_flip( $whitelist ) );
469
470      $errors = new WP_Error();
471
472      /**
473       * Fires when data should be validated for a site prior to inserting or updating in the database.
474       *