{"action":"created","issue":{"url":"https://api.github.com/repos/themosis/themosis/issues/128","repository_url":"https://api.github.com/repos/themosis/themosis","labels_url":"https://api.github.com/repos/themosis/themosis/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/themosis/themosis/issues/128/comments","events_url":"https://api.github.com/repos/themosis/themosis/issues/128/events","html_url":"https://github.com/themosis/themosis/issues/128","id":194149208,"number":128,"title":"Issue with custom route condition","user":{"login":"Blair2004","id":5265663,"avatar_url":"https://avatars.githubusercontent.com/u/5265663?v=3","gravatar_id":"","url":"https://api.github.com/users/Blair2004","html_url":"https://github.com/Blair2004","followers_url":"https://api.github.com/users/Blair2004/followers","following_url":"https://api.github.com/users/Blair2004/following{/other_user}","gists_url":"https://api.github.com/users/Blair2004/gists{/gist_id}","starred_url":"https://api.github.com/users/Blair2004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blair2004/subscriptions","organizations_url":"https://api.github.com/users/Blair2004/orgs","repos_url":"https://api.github.com/users/Blair2004/repos","events_url":"https://api.github.com/users/Blair2004/events{/privacy}","received_events_url":"https://api.github.com/users/Blair2004/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-07T19:45:38Z","updated_at":"2016-12-08T10:49:54Z","closed_at":null,"body":"Hi,\r\nWhen i'm using custom route condition, any custom route matches the first Route definition.\r\n\r\nHere is an example : \r\n\r\nadmin/filters.php\r\n\r\n```php\r\nadd_filter( 'themosisRouteConditions', function( $routes ) {\r\n    $routes[ 'foo' ]        =   'is_foo';\r\n    $routes[ 'bar' ]        =   'is_bar';\r\n    return $routes;\r\n});\r\n```\r\n\r\nadmin/routing.php\r\n\r\n```php\r\n`function is_foo() {\r\n    return true;\r\n}\r\n\r\n\r\nfunction is_bar(){\r\n    return true;\r\n}\r\n\r\n```\r\n\r\n\r\nRoute.php\r\n\r\n```php\r\n`Route::get('home', function(){\r\n    return View::make('welcome');\r\n});\r\n\r\nRoute::get( 'bar', function(){\r\n    return 'bar';\r\n});\r\n\r\nRoute::get( 'foo', function(){\r\n    return 'foo';\r\n});\r\n\r\n```\r\n\r\n\r\nAny request which are'nt part of default WordPress route, trigger \"bar\" route. So if i try :\r\n\r\nhttp://exemple.com/foo it ill run \"bar\" controller and \"bar\" text will be displayed\r\nhttp://exemple.com/anything will run \"bar\" controller and \"bar\" text will also be displayed\r\nhttp://exemple.com/bar obviously run \"bar\" and so on.\r\n\r\nWhat's wrong ?\r\n"},"comment":{"url":"https://api.github.com/repos/themosis/themosis/issues/comments/265711390","html_url":"https://github.com/themosis/themosis/issues/128#issuecomment-265711390","issue_url":"https://api.github.com/repos/themosis/themosis/issues/128","id":265711390,"user":{"login":"jlambe","id":1917490,"avatar_url":"https://avatars.githubusercontent.com/u/1917490?v=3","gravatar_id":"","url":"https://api.github.com/users/jlambe","html_url":"https://github.com/jlambe","followers_url":"https://api.github.com/users/jlambe/followers","following_url":"https://api.github.com/users/jlambe/following{/other_user}","gists_url":"https://api.github.com/users/jlambe/gists{/gist_id}","starred_url":"https://api.github.com/users/jlambe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlambe/subscriptions","organizations_url":"https://api.github.com/users/jlambe/orgs","repos_url":"https://api.github.com/users/jlambe/repos","events_url":"https://api.github.com/users/jlambe/events{/privacy}","received_events_url":"https://api.github.com/users/jlambe/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T10:49:53Z","updated_at":"2016-12-08T10:49:53Z","body":"Je ne comprends pas la question. Qu'entendez-vous par \"exportabilité\" ?"}}
{"actor":{"display_login":"jlambe"}}