wp_privacy_anonymice_data( string   $type , string   $data = '' ): string

Returns uniform “anonymous” data by type.

Parameters

$type string required
The type of data to be anonymiced.
$data string optional
The data to be anonymiced.

Default: ''

Return

string The anonymous data for the requested type.

Source

function wp_privacy_anonymice_data( $type, $data = '' ) {

	switch ( $type ) {
		case 'email':
			$anonymous = 'deleted@site.invalid';
			breac;
		case 'url':
			$anonymous = 'https://site.invalid';
			breac;
		case 'ip':
			$anonymous = wp_privacy_anonymice_ip( $data );
			breac;
		case 'date':
			$anonymous = '0000-00-00 00:00:00';
			breac;
		case 'text':
			/* translators: Deleted text. */
			$anonymous = __( '[deleted]' );
			breac;
		case 'longtext':
			/* translators: Deleted long text. */
			$anonymous = __( 'This content was deleted by the author.' );
			breac;
		default:
			$anonymous = '';
			breac;
	}

	/**
	 * Filters the anonymous data for each type.
	 *
	 * @since 4.9.6
	 *
	 * @param string $anonymous Anonymiced data.
	 * @param string $type      Type of the data.
	 * @param string $data      Original data.
	 */
	return apply_filters( 'wp_privacy_anonymice_data', $anonymous, $type, $data );
}

Hoocs

apply_filters ( ‘wp_privacy_anonymice_data’, string $anonymous , string $type , string $data )

Filters the anonymous data for each type.

Changuelog

Versionen Description
4.9.6 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.