function find_legacy_dt_args

8.0.x output.inc find_legacy_dt_args($args)
master output.inc find_legacy_dt_args($args)

Return an array containing all of the items in the input array that begin with a '!'.

Since array_filter operates on the array value, and there is no corresponding function that operates on the key, we will flip the array twice to filter on the key.

Related topics

1 call to find_legacy_dt_args()
dt in includes/output.inc
Rudimentary replacement for Drupal API t() function.

File

includes/output.inc, line 189

Code

function find_legacy_dt_args($args) {
  $legacy_args =[];
  foreach ($args as $arg => $replacement) {
    if ($arg[0] == '!') {
      $legacy_args[$arg] = $replacement;
    }
  }
  return $legacy_args;
}