Can we implement hook_admin_paths D7 hook (declare it in route definition for D8) in this module?
In our project we ran into issue where we are doing a lot of frontend optimization for the frontend and we don't want them to interfere with the backend/admin interface. So we are using path_is_admin() often.

Plus token/tree is an admin path IMO.

Thoughts?

D8

in: token.routing.yml (see 2224207)

token.tree:
  path: '/token/tree'
  defaults:
    _controller: '\Drupal\token\Controller\TokenTreeController::outputTree'
  options:
    _admin_route: FALSE
  requirements:
    _csrf_token: 'TRUE'

D7

in: token.module (see hook_admin_paths API doc)

/**
 * Implements hook_admin_paths().
 */
function token_admin_paths() {
  return array(
    'token/tree' => TRUE,
  );
}

Comments

gabriel.achille created an issue. See original summary.

gabriel.achille’s picture

Issue summary: View changes