{"action":"closed","number":2782,"pull_request":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2782","id":41395420,"html_url":"https://github.com/Yoast/wordpress-seo/pull/2782","diff_url":"https://github.com/Yoast/wordpress-seo/pull/2782.diff","patch_url":"https://github.com/Yoast/wordpress-seo/pull/2782.patch","issue_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/2782","number":2782,"state":"closed","locked":false,"title":"Fix early call of current_user_can()","user":{"login":"claudiosmweb","id":1264099,"avatar_url":"https://avatars.githubusercontent.com/u/1264099?v=3","gravatar_id":"","url":"https://api.github.com/users/claudiosmweb","html_url":"https://github.com/claudiosmweb","followers_url":"https://api.github.com/users/claudiosmweb/followers","following_url":"https://api.github.com/users/claudiosmweb/following{/other_user}","gists_url":"https://api.github.com/users/claudiosmweb/gists{/gist_id}","starred_url":"https://api.github.com/users/claudiosmweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudiosmweb/subscriptions","organizations_url":"https://api.github.com/users/claudiosmweb/orgs","repos_url":"https://api.github.com/users/claudiosmweb/repos","events_url":"https://api.github.com/users/claudiosmweb/events{/privacy}","received_events_url":"https://api.github.com/users/claudiosmweb/received_events","type":"User","site_admin":false},"body":"Call `current_user_can()` inside `plugins_load` is too early and this trigger some functions and hooks that can be used by another plugins.\r\n\r\nI just saw a case where it forced the call of some hooks where the `$wp_rewrite` global variable does not exist yet.\r\n\r\nOn my side I can not correct in any way, only with hacks to avoid this. Then the best would be to move https://github.com/Yoast/wordpress-seo/blob/trunk/wp-seo-main.php#L246 into `WPSEO_Customizer` class.\r\n","created_at":"2015-08-01T03:17:52Z","updated_at":"2015-08-04T09:55:48Z","closed_at":"2015-08-04T09:55:48Z","merged_at":"2015-08-04T09:55:48Z","merge_commit_sha":"18413da2558af192f9c2652d6d6556967f3a40c6","assignee":null,"milestone":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/milestones/17","html_url":"https://github.com/Yoast/wordpress-seo/milestones/2.3.3","labels_url":"https://api.github.com/repos/Yoast/wordpress-seo/milestones/17/labels","id":1231026,"number":17,"title":"2.3.3","description":"","creator":{"login":"omarreiss","id":1488816,"avatar_url":"https://avatars.githubusercontent.com/u/1488816?v=3","gravatar_id":"","url":"https://api.github.com/users/omarreiss","html_url":"https://github.com/omarreiss","followers_url":"https://api.github.com/users/omarreiss/followers","following_url":"https://api.github.com/users/omarreiss/following{/other_user}","gists_url":"https://api.github.com/users/omarreiss/gists{/gist_id}","starred_url":"https://api.github.com/users/omarreiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarreiss/subscriptions","organizations_url":"https://api.github.com/users/omarreiss/orgs","repos_url":"https://api.github.com/users/omarreiss/repos","events_url":"https://api.github.com/users/omarreiss/events{/privacy}","received_events_url":"https://api.github.com/users/omarreiss/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":10,"state":"open","created_at":"2015-07-29T07:19:33Z","updated_at":"2015-08-04T09:55:48Z","due_on":"2015-08-04T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2782/commits","review_comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2782/comments","review_comment_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/2782/comments","statuses_url":"https://api.github.com/repos/Yoast/wordpress-seo/statuses/84f31d6048f78469a998dcea0b60c36f5fd9a673","head":{"label":"claudiosmweb:fix-early-current_user_can","ref":"fix-early-current_user_can","sha":"84f31d6048f78469a998dcea0b60c36f5fd9a673","user":{"login":"claudiosmweb","id":1264099,"avatar_url":"https://avatars.githubusercontent.com/u/1264099?v=3","gravatar_id":"","url":"https://api.github.com/users/claudiosmweb","html_url":"https://github.com/claudiosmweb","followers_url":"https://api.github.com/users/claudiosmweb/followers","following_url":"https://api.github.com/users/claudiosmweb/following{/other_user}","gists_url":"https://api.github.com/users/claudiosmweb/gists{/gist_id}","starred_url":"https://api.github.com/users/claudiosmweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudiosmweb/subscriptions","organizations_url":"https://api.github.com/users/claudiosmweb/orgs","repos_url":"https://api.github.com/users/claudiosmweb/repos","events_url":"https://api.github.com/users/claudiosmweb/events{/privacy}","received_events_url":"https://api.github.com/users/claudiosmweb/received_events","type":"User","site_admin":false},"repo":{"id":40033282,"name":"wordpress-seo","full_name":"claudiosmweb/wordpress-seo","owner":{"login":"claudiosmweb","id":1264099,"avatar_url":"https://avatars.githubusercontent.com/u/1264099?v=3","gravatar_id":"","url":"https://api.github.com/users/claudiosmweb","html_url":"https://github.com/claudiosmweb","followers_url":"https://api.github.com/users/claudiosmweb/followers","following_url":"https://api.github.com/users/claudiosmweb/following{/other_user}","gists_url":"https://api.github.com/users/claudiosmweb/gists{/gist_id}","starred_url":"https://api.github.com/users/claudiosmweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudiosmweb/subscriptions","organizations_url":"https://api.github.com/users/claudiosmweb/orgs","repos_url":"https://api.github.com/users/claudiosmweb/repos","events_url":"https://api.github.com/users/claudiosmweb/events{/privacy}","received_events_url":"https://api.github.com/users/claudiosmweb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/claudiosmweb/wordpress-seo","description":"Yoast SEO for WordPress","fork":true,"url":"https://api.github.com/repos/claudiosmweb/wordpress-seo","forks_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/forks","keys_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/teams","hooks_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/hooks","issue_events_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/issues/events{/number}","events_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/events","assignees_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/assignees{/user}","branches_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/branches{/branch}","tags_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/tags","blobs_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/git/refs{/sha}","trees_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/statuses/{sha}","languages_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/languages","stargazers_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/stargazers","contributors_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/contributors","subscribers_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/subscribers","subscription_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/subscription","commits_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/commits{/sha}","git_commits_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/git/commits{/sha}","comments_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/comments{/number}","issue_comment_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/issues/comments{/number}","contents_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/contents/{+path}","compare_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/merges","archive_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/downloads","issues_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/issues{/number}","pulls_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/pulls{/number}","milestones_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/milestones{/number}","notifications_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/labels{/name}","releases_url":"https://api.github.com/repos/claudiosmweb/wordpress-seo/releases{/id}","created_at":"2015-08-01T02:56:29Z","updated_at":"2015-08-01T02:56:31Z","pushed_at":"2015-08-01T03:03:19Z","git_url":"git://github.com/claudiosmweb/wordpress-seo.git","ssh_url":"git@github.com:claudiosmweb/wordpress-seo.git","clone_url":"https://github.com/claudiosmweb/wordpress-seo.git","svn_url":"https://github.com/claudiosmweb/wordpress-seo","homepage":"http://yoast.com/wordpress/seo/","size":25617,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"Yoast:trunk","ref":"trunk","sha":"c6a6fedcc8fc003b683d78132418f32b9131b501","user":{"login":"Yoast","id":4690436,"avatar_url":"https://avatars.githubusercontent.com/u/4690436?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"repo":{"id":6723399,"name":"wordpress-seo","full_name":"Yoast/wordpress-seo","owner":{"login":"Yoast","id":4690436,"avatar_url":"https://avatars.githubusercontent.com/u/4690436?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yoast/wordpress-seo","description":"Yoast SEO for WordPress","fork":false,"url":"https://api.github.com/repos/Yoast/wordpress-seo","forks_url":"https://api.github.com/repos/Yoast/wordpress-seo/forks","keys_url":"https://api.github.com/repos/Yoast/wordpress-seo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yoast/wordpress-seo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yoast/wordpress-seo/teams","hooks_url":"https://api.github.com/repos/Yoast/wordpress-seo/hooks","issue_events_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/events{/number}","events_url":"https://api.github.com/repos/Yoast/wordpress-seo/events","assignees_url":"https://api.github.com/repos/Yoast/wordpress-seo/assignees{/user}","branches_url":"https://api.github.com/repos/Yoast/wordpress-seo/branches{/branch}","tags_url":"https://api.github.com/repos/Yoast/wordpress-seo/tags","blobs_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yoast/wordpress-seo/statuses/{sha}","languages_url":"https://api.github.com/repos/Yoast/wordpress-seo/languages","stargazers_url":"https://api.github.com/repos/Yoast/wordpress-seo/stargazers","contributors_url":"https://api.github.com/repos/Yoast/wordpress-seo/contributors","subscribers_url":"https://api.github.com/repos/Yoast/wordpress-seo/subscribers","subscription_url":"https://api.github.com/repos/Yoast/wordpress-seo/subscription","commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yoast/wordpress-seo/contents/{+path}","compare_url":"https://api.github.com/repos/Yoast/wordpress-seo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yoast/wordpress-seo/merges","archive_url":"https://api.github.com/repos/Yoast/wordpress-seo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yoast/wordpress-seo/downloads","issues_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues{/number}","pulls_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls{/number}","milestones_url":"https://api.github.com/repos/Yoast/wordpress-seo/milestones{/number}","notifications_url":"https://api.github.com/repos/Yoast/wordpress-seo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yoast/wordpress-seo/labels{/name}","releases_url":"https://api.github.com/repos/Yoast/wordpress-seo/releases{/id}","created_at":"2012-11-16T15:16:29Z","updated_at":"2015-08-03T01:51:08Z","pushed_at":"2015-08-04T09:55:48Z","git_url":"git://github.com/Yoast/wordpress-seo.git","ssh_url":"git@github.com:Yoast/wordpress-seo.git","clone_url":"https://github.com/Yoast/wordpress-seo.git","svn_url":"https://github.com/Yoast/wordpress-seo","homepage":"http://yoast.com/wordpress/seo/","size":25617,"stargazers_count":510,"watchers_count":510,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":305,"mirror_url":null,"open_issues_count":256,"forks":305,"open_issues":256,"watchers":510,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2782"},"html":{"href":"https://github.com/Yoast/wordpress-seo/pull/2782"},"issue":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/issues/2782"},"comments":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/issues/2782/comments"},"review_comments":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2782/comments"},"review_comment":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2782/commits"},"statuses":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/statuses/84f31d6048f78469a998dcea0b60c36f5fd9a673"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"omarreiss","id":1488816,"avatar_url":"https://avatars.githubusercontent.com/u/1488816?v=3","gravatar_id":"","url":"https://api.github.com/users/omarreiss","html_url":"https://github.com/omarreiss","followers_url":"https://api.github.com/users/omarreiss/followers","following_url":"https://api.github.com/users/omarreiss/following{/other_user}","gists_url":"https://api.github.com/users/omarreiss/gists{/gist_id}","starred_url":"https://api.github.com/users/omarreiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarreiss/subscriptions","organizations_url":"https://api.github.com/users/omarreiss/orgs","repos_url":"https://api.github.com/users/omarreiss/repos","events_url":"https://api.github.com/users/omarreiss/events{/privacy}","received_events_url":"https://api.github.com/users/omarreiss/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":1,"additions":5,"deletions":3,"changed_files":2}}