Problem
Admin routes are matched based on URL parameters. This is not very reliable because a match is only found when the page parameter is first.
For example,
With the route:
$router->adminGet('calendars', [
'uses' => 'CalendarController@index',
'as' => 'calendar.index',
'icon' => 'dashicons-calendar-alt',
'position' => 20,
]);
This URL will match the above route.
/cms/wp-admin/admin.php?page=calendars&id=boise
This URL will NOT match the above route.
/cms/wp-admin/admin.php?id=boise&page=calendars
Both should work.
Suggested Fix
Change the LaraPress UriValidator class to pull the page parameter first when checking for a WP Admin page match.
Problem
Admin routes are matched based on URL parameters. This is not very reliable because a match is only found when the page parameter is first.
For example,
With the route:
This URL will match the above route.
/cms/wp-admin/admin.php?page=calendars&id=boiseThis URL will NOT match the above route.
/cms/wp-admin/admin.php?id=boise&page=calendarsBoth should work.
Suggested Fix
Change the LaraPress
UriValidatorclass to pull the page parameter first when checking for a WP Admin page match.