Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Define administrative paths.
Modules may specify whether or not the paths they define in hook_menu() are to be considered administrative. Other modules may use this information to display those pages differently (e.g. in a modal overlay, or in a different theme).
This will do all (most of) the work for you won't it?