function find_legacy_dt_args

8.0.x find_legacy_dt_args($args)
master 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/
Rudimentary replacement for Drupal API t() function.


includes/, line 189


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