{"action":"created","issue":{"url":"https://api.github.com/repos/wecodemore/wcm_lang_switch/issues/37","repository_url":"https://api.github.com/repos/wecodemore/wcm_lang_switch","labels_url":"https://api.github.com/repos/wecodemore/wcm_lang_switch/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/wecodemore/wcm_lang_switch/issues/37/comments","events_url":"https://api.github.com/repos/wecodemore/wcm_lang_switch/issues/37/events","html_url":"https://github.com/wecodemore/wcm_lang_switch/issues/37","id":300147862,"number":37,"title":"Wrong hook used for toolbar manipulation","user":{"login":"Rarst","id":737584,"avatar_url":"https://avatars0.githubusercontent.com/u/737584?v=4","gravatar_id":"","url":"https://api.github.com/users/Rarst","html_url":"https://github.com/Rarst","followers_url":"https://api.github.com/users/Rarst/followers","following_url":"https://api.github.com/users/Rarst/following{/other_user}","gists_url":"https://api.github.com/users/Rarst/gists{/gist_id}","starred_url":"https://api.github.com/users/Rarst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rarst/subscriptions","organizations_url":"https://api.github.com/users/Rarst/orgs","repos_url":"https://api.github.com/users/Rarst/repos","events_url":"https://api.github.com/users/Rarst/events{/privacy}","received_events_url":"https://api.github.com/users/Rarst/received_events","type":"User","site_admin":false},"labels":[{"id":24265526,"url":"https://api.github.com/repos/wecodemore/wcm_lang_switch/labels/bug","name":"bug","color":"fc2929","default":true},{"id":24265530,"url":"https://api.github.com/repos/wecodemore/wcm_lang_switch/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":{"login":"franz-josef-kaiser","id":387666,"avatar_url":"https://avatars2.githubusercontent.com/u/387666?v=4","gravatar_id":"","url":"https://api.github.com/users/franz-josef-kaiser","html_url":"https://github.com/franz-josef-kaiser","followers_url":"https://api.github.com/users/franz-josef-kaiser/followers","following_url":"https://api.github.com/users/franz-josef-kaiser/following{/other_user}","gists_url":"https://api.github.com/users/franz-josef-kaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/franz-josef-kaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franz-josef-kaiser/subscriptions","organizations_url":"https://api.github.com/users/franz-josef-kaiser/orgs","repos_url":"https://api.github.com/users/franz-josef-kaiser/repos","events_url":"https://api.github.com/users/franz-josef-kaiser/events{/privacy}","received_events_url":"https://api.github.com/users/franz-josef-kaiser/received_events","type":"User","site_admin":false},"assignees":[{"login":"franz-josef-kaiser","id":387666,"avatar_url":"https://avatars2.githubusercontent.com/u/387666?v=4","gravatar_id":"","url":"https://api.github.com/users/franz-josef-kaiser","html_url":"https://github.com/franz-josef-kaiser","followers_url":"https://api.github.com/users/franz-josef-kaiser/followers","following_url":"https://api.github.com/users/franz-josef-kaiser/following{/other_user}","gists_url":"https://api.github.com/users/franz-josef-kaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/franz-josef-kaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franz-josef-kaiser/subscriptions","organizations_url":"https://api.github.com/users/franz-josef-kaiser/orgs","repos_url":"https://api.github.com/users/franz-josef-kaiser/repos","events_url":"https://api.github.com/users/franz-josef-kaiser/events{/privacy}","received_events_url":"https://api.github.com/users/franz-josef-kaiser/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/wecodemore/wcm_lang_switch/milestones/1","html_url":"https://github.com/wecodemore/wcm_lang_switch/milestone/1","labels_url":"https://api.github.com/repos/wecodemore/wcm_lang_switch/milestones/1/labels","id":353795,"number":1,"title":"1.8","description":"Add Network support. See ticket #27","creator":{"login":"franz-josef-kaiser","id":387666,"avatar_url":"https://avatars2.githubusercontent.com/u/387666?v=4","gravatar_id":"","url":"https://api.github.com/users/franz-josef-kaiser","html_url":"https://github.com/franz-josef-kaiser","followers_url":"https://api.github.com/users/franz-josef-kaiser/followers","following_url":"https://api.github.com/users/franz-josef-kaiser/following{/other_user}","gists_url":"https://api.github.com/users/franz-josef-kaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/franz-josef-kaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franz-josef-kaiser/subscriptions","organizations_url":"https://api.github.com/users/franz-josef-kaiser/orgs","repos_url":"https://api.github.com/users/franz-josef-kaiser/repos","events_url":"https://api.github.com/users/franz-josef-kaiser/events{/privacy}","received_events_url":"https://api.github.com/users/franz-josef-kaiser/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":1,"state":"open","created_at":"2013-06-12T14:08:50Z","updated_at":"2018-03-02T21:39:27Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-02-26T08:32:49Z","updated_at":"2018-03-04T19:58:22Z","closed_at":null,"author_association":"NONE","body":"The plugin currently uses `wp_before_admin_bar_render` hook for toolbar manipulation. This is a _render_ hook, that doesn't have access to `$wp_admin_bar` instance and is not meant to work with it.\r\n\r\nThe appropriate hook is `admin_bar_menu` which is explicitly documented for manipulating toolbar items and comes with `$wp_admin_bar` instance access."},"comment":{"url":"https://api.github.com/repos/wecodemore/wcm_lang_switch/issues/comments/370258700","html_url":"https://github.com/wecodemore/wcm_lang_switch/issues/37#issuecomment-370258700","issue_url":"https://api.github.com/repos/wecodemore/wcm_lang_switch/issues/37","id":370258700,"user":{"login":"Rarst","id":737584,"avatar_url":"https://avatars0.githubusercontent.com/u/737584?v=4","gravatar_id":"","url":"https://api.github.com/users/Rarst","html_url":"https://github.com/Rarst","followers_url":"https://api.github.com/users/Rarst/followers","following_url":"https://api.github.com/users/Rarst/following{/other_user}","gists_url":"https://api.github.com/users/Rarst/gists{/gist_id}","starred_url":"https://api.github.com/users/Rarst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rarst/subscriptions","organizations_url":"https://api.github.com/users/Rarst/orgs","repos_url":"https://api.github.com/users/Rarst/repos","events_url":"https://api.github.com/users/Rarst/events{/privacy}","received_events_url":"https://api.github.com/users/Rarst/received_events","type":"User","site_admin":false},"created_at":"2018-03-04T19:58:22Z","updated_at":"2018-03-04T19:58:22Z","author_association":"NONE","body":"Not sure what you mean by \"a try\"?\r\n\r\nEssentially the issue is that when correct hook is used then the same hook can (and should) be used to manipulate the toolbar nodes as necessary.\r\n\r\nBut since this plugin uses different hook it falls out of scope, so to say, and requires unique and entirely different code path to work with its nodes. A callback on the \"right\" hook would never see those nodes since they are registered after that  hook altogether."}}
{"actor":{"display_login":"Rarst"}}