ap_whitelist_array( array $master_keys, array $arr )

Description #

Whitelist array items.

Parameters #

  • $master_keys
    array (Required) Master keys.
  • $arr
    array (Required) Array to filter.

Source #

File: includes/functions.php

function ap_whitelist_array( $master_keys, $arr ) {
	return array_intersect_key( $arr, array_flip( $master_keys ) );
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment