wphooks.info - wp_normalize_site_data

wp_normalize_site_data

(trunk - 5.1-alpha-44286)

*** New in trunk ***

The hook occurs in the following file:

wp-includes/ms-blogs.php:
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
	}

	/**
	 * Filters passed site data in order to normalize it.
	 *
	 * @since 5.0.0
	 *
	 * @param array $data Associative array of site data passed to the respective function.
	 *                    See {@see wp_insert_site()} for the possibly included data.
	 */
	$data = apply_filters( 'wp_normalize_site_data', $data );

	$whitelist = array( 'domain', 'path', 'network_id', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' );
	$data      = array_intersect_key( wp_parse_args( $data, $defaults ), array_flip( $whitelist ) );

	$errors = new WP_Error();

	/**
	 * Fires when data should be validated for a site prior to inserting or updating in the database.
	 *