GitHub PullRequestEvent at 2014-09-05 12:18:31
Repository: TGM-Plugin-Activation
Actor: jrfnl
Payload: {"action":"opened","number":219,"pull_request":{"url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/pulls/219","id":20804334,"html_url":"https://github.com/thomasgriffin/TGM-Plugin-Activation/pull/219","diff_url":"https://github.com/thomasgriffin/TGM-Plugin-Activation/pull/219.diff","patch_url":"https://github.com/thomasgriffin/TGM-Plugin-Activation/pull/219.patch","issue_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/issues/219","number":219,"state":"open","locked":false,"title":"Improve extensibility","user":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars.githubusercontent.com/u/663378?v=2","gravatar_id":"ed3f04e59a9c05a471285209f9322b0e","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"body":"The changes in this PR allow for the class to be extended from a child class for a specific implementation and to set the parent_slug from the config.\r\n\r\nThe way the class was set up, extending from a child class would mean overloading a truck load of methods to get round the hard coded class name and some more convoluted coding to overrule the instance and the auto-instantiation of the class.\r\nThese changes take the pain out of extending the class and make it so this library can be have a clean upgrade path even when you extend the class.\r\n\r\n#### Details:\r\n* Allow setting of the parent menu item from the $config array\r\n* Wrap instantiation in a hooked function (so it can be unhooked)\r\n* Use the global to get to the instance.\r\nThis allows for an extended child class to set the global and for everything to still work provided the child class provides their own static `get_instance()` method which sets their own static `$instance` property.\r\n* Force instantiation via `get_instance()` by making the constructor protected","created_at":"2014-09-05T12:18:31Z","updated_at":"2014-09-05T12:18:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/pulls/219/commits","review_comments_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/pulls/219/comments","review_comment_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/pulls/comments/{number}","comments_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/issues/219/comments","statuses_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/statuses/196aa59b2c6ad4ea0ef2d218a4734e61b2ca21df","head":{"label":"jrfnl:Improve-extensibility","ref":"Improve-extensibility","sha":"196aa59b2c6ad4ea0ef2d218a4734e61b2ca21df","user":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars.githubusercontent.com/u/663378?v=2","gravatar_id":"ed3f04e59a9c05a471285209f9322b0e","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"repo":{"id":21699225,"name":"TGM-Plugin-Activation","full_name":"jrfnl/TGM-Plugin-Activation","owner":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars.githubusercontent.com/u/663378?v=2","gravatar_id":"ed3f04e59a9c05a471285209f9322b0e","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jrfnl/TGM-Plugin-Activation","description":"TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference pre-packaged plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.","fork":true,"url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation","forks_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/forks","keys_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/teams","hooks_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/hooks","issue_events_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/issues/events{/number}","events_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/events","assignees_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/assignees{/user}","branches_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/branches{/branch}","tags_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/tags","blobs_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/statuses/{sha}","languages_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/languages","stargazers_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/stargazers","contributors_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/contributors","subscribers_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/subscribers","subscription_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/subscription","commits_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/issues/comments/{number}","contents_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/contents/{+path}","compare_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/merges","archive_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/downloads","issues_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/issues{/number}","pulls_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/pulls{/number}","milestones_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/milestones{/number}","notifications_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/labels{/name}","releases_url":"https://api.github.com/repos/jrfnl/TGM-Plugin-Activation/releases{/id}","created_at":"2014-07-10T15:25:03Z","updated_at":"2014-09-05T11:48:12Z","pushed_at":"2014-09-05T12:08:09Z","git_url":"git://github.com/jrfnl/TGM-Plugin-Activation.git","ssh_url":"git@github.com:jrfnl/TGM-Plugin-Activation.git","clone_url":"https://github.com/jrfnl/TGM-Plugin-Activation.git","svn_url":"https://github.com/jrfnl/TGM-Plugin-Activation","homepage":"http://tgmpluginactivation.com","size":28858,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"thomasgriffin:develop","ref":"develop","sha":"9086b9ae37c19a357265a5c4ed78b1e5ae0951ec","user":{"login":"thomasgriffin","id":909318,"avatar_url":"https://avatars.githubusercontent.com/u/909318?v=2","gravatar_id":"a323ded00940f043d9f0756df8277297","url":"https://api.github.com/users/thomasgriffin","html_url":"https://github.com/thomasgriffin","followers_url":"https://api.github.com/users/thomasgriffin/followers","following_url":"https://api.github.com/users/thomasgriffin/following{/other_user}","gists_url":"https://api.github.com/users/thomasgriffin/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasgriffin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasgriffin/subscriptions","organizations_url":"https://api.github.com/users/thomasgriffin/orgs","repos_url":"https://api.github.com/users/thomasgriffin/repos","events_url":"https://api.github.com/users/thomasgriffin/events{/privacy}","received_events_url":"https://api.github.com/users/thomasgriffin/received_events","type":"User","site_admin":false},"repo":{"id":2482214,"name":"TGM-Plugin-Activation","full_name":"thomasgriffin/TGM-Plugin-Activation","owner":{"login":"thomasgriffin","id":909318,"avatar_url":"https://avatars.githubusercontent.com/u/909318?v=2","gravatar_id":"a323ded00940f043d9f0756df8277297","url":"https://api.github.com/users/thomasgriffin","html_url":"https://github.com/thomasgriffin","followers_url":"https://api.github.com/users/thomasgriffin/followers","following_url":"https://api.github.com/users/thomasgriffin/following{/other_user}","gists_url":"https://api.github.com/users/thomasgriffin/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasgriffin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasgriffin/subscriptions","organizations_url":"https://api.github.com/users/thomasgriffin/orgs","repos_url":"https://api.github.com/users/thomasgriffin/repos","events_url":"https://api.github.com/users/thomasgriffin/events{/privacy}","received_events_url":"https://api.github.com/users/thomasgriffin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thomasgriffin/TGM-Plugin-Activation","description":"TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference pre-packaged plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.","fork":false,"url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation","forks_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/forks","keys_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/teams","hooks_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/hooks","issue_events_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/issues/events{/number}","events_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/events","assignees_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/assignees{/user}","branches_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/branches{/branch}","tags_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/tags","blobs_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/git/refs{/sha}","trees_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/statuses/{sha}","languages_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/languages","stargazers_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/stargazers","contributors_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/contributors","subscribers_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/subscribers","subscription_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/subscription","commits_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/commits{/sha}","git_commits_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/git/commits{/sha}","comments_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/comments{/number}","issue_comment_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/issues/comments/{number}","contents_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/contents/{+path}","compare_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/merges","archive_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/downloads","issues_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/issues{/number}","pulls_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/pulls{/number}","milestones_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/milestones{/number}","notifications_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/labels{/name}","releases_url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/releases{/id}","created_at":"2011-09-29T13:51:03Z","updated_at":"2014-09-05T12:08:29Z","pushed_at":"2014-08-25T09:06:42Z","git_url":"git://github.com/thomasgriffin/TGM-Plugin-Activation.git","ssh_url":"git@github.com:thomasgriffin/TGM-Plugin-Activation.git","clone_url":"https://github.com/thomasgriffin/TGM-Plugin-Activation.git","svn_url":"https://github.com/thomasgriffin/TGM-Plugin-Activation","homepage":"http://tgmpluginactivation.com","size":29108,"stargazers_count":698,"watchers_count":698,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":186,"mirror_url":null,"open_issues_count":20,"forks":186,"open_issues":20,"watchers":698,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/pulls/219"},"html":{"href":"https://github.com/thomasgriffin/TGM-Plugin-Activation/pull/219"},"issue":{"href":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/issues/219"},"comments":{"href":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/issues/219/comments"},"review_comments":{"href":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/pulls/219/comments"},"review_comment":{"href":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/pulls/219/commits"},"statuses":{"href":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/statuses/196aa59b2c6ad4ea0ef2d218a4734e61b2ca21df"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":6,"additions":57,"deletions":38,"changed_files":2}}