ap_whitelist_array( array $master_keys, array $array )

Description #

Whitelist array items.

Parameters #

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

Source #

File: includes/functions.php

function ap_whitelist_array( $master_keys, $array ) {
	return array_intersect_key( $array, 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