original_string: protected function isPluginActiveAdmin($plugin_route)
      {
          $should_run = false;
  
          $uri = $this->grav['uri'];
  
          if (strpos($uri->path(), $this->config->get('plugins.admin.route') . '/' . $plugin_route) === false) {
              $should_run = false;
          } elseif (isset($uri->paths()[1]) && $uri->paths()[1] === $plugin_route) {
              $should_run = true;
          }
  
          return $should_run;
      }
code: protected function isPluginActiveAdmin($plugin_route)
      {
          $should_run = false;
  
          $uri = $this->grav['uri'];
  
          if (strpos($uri->path(), $this->config->get('plugins.admin.route') . '/' . $plugin_route) === false) {
              $should_run = false;
          } elseif (isset($uri->paths()[1]) && $uri->paths()[1] === $plugin_route) {
              $should_run = true;
          }
  
          return $should_run;
      }
code_tokens: protected function isPluginActiveAdmin ( $ plugin_route ) { $ should_run = false ; $ uri = $ this -> grav [ 'uri' ] ; if ( strpos ( $ uri -> path ( ) , $ this -> config -> get ( 'plugins.admin.route' ) . '/' . $ plugin_route ) === false ) { $ should_run = false ; } elseif ( isset ( $ uri -> paths ( ) [ 1 ] ) && $ uri -> paths ( ) [ 1 ] === $ plugin_route ) { $ should_run = true ; } return $ should_run ; }
docstring: Determine if this route is in Admin and active for the plugin
  
  @param string $plugin_route
  @return bool
docstring_tokens: Determine if this route is in Admin and active for the plugin