Skip to content

Instantly share code, notes, and snippets.

@ADmad
Last active April 3, 2020 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ADmad/3759b0d77d67e477f7df1cc262601cd0 to your computer and use it in GitHub Desktop.
Save ADmad/3759b0d77d67e477f7df1cc262601cd0 to your computer and use it in GitHub Desktop.
<?php
// Don't automatically add "plugin" to urls if currently on a plugin action
Router::addUrlFilter(function ($params, $request) {
if (!isset($params['plugin'])) {
$params['plugin'] = false;
}
return $params;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment