{"issue":{"title":"Allow use of class extended from TGM_Plugin_Activation","user":{"login":"GaryJones","id":88371,"url":"https://api.github.com/users/GaryJones","gravatar_id":"e70d4086e89c2e1e081870865be68485","avatar_url":"https://secure.gravatar.com/avatar/e70d4086e89c2e1e081870865be68485?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"created_at":"2011-10-19T11:10:42Z","milestone":{"title":"Version 2.2.0","created_at":"2011-10-17T15:45:30Z","creator":{"login":"thomasgriffin","id":909318,"url":"https://api.github.com/users/thomasgriffin","gravatar_id":"a323ded00940f043d9f0756df8277297","avatar_url":"https://secure.gravatar.com/avatar/a323ded00940f043d9f0756df8277297?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"open_issues":7,"state":"open","due_on":null,"closed_issues":8,"number":3,"description":"","url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/milestones/3"},"state":"closed","updated_at":"2011-12-26T06:58:15Z","labels":[{"name":"Improvement","url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/labels/Improvement","color":"02e10c"},{"name":"Maybe Later","url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/labels/Maybe+Later","color":"d7e102"}],"id":1992788,"closed_at":"2011-12-26T06:58:15Z","html_url":"https://github.com/thomasgriffin/TGM-Plugin-Activation/issues/59","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"Although the main class can be extended, the `tgmpa()` function forces the registration through our main class.\r\n\r\nConsider adding a filter inside `tgmpa()` which can change the name of the called class.\r\nDevelopers can then add an `add_filter()` line, and a function which returns the name of their extended class.\r\n\r\n---\r\n\r\nThe current alternative to doing this, is that a developer would need to write their own equivalent of `tgmpa()` which calls their own class, and reference that new function name when they register the plugins. In this case, `tgmpa()` isn't a complicated function, but duplication of code is bad.\r\n\r\n---\r\n\r\nPerhaps the best solution would be to allow the name of a class to be passed in via the `$config` array, which can be pulled out immediately (and unset from `$config`), and use that to register the plugins and the remaining configurations. Unfortunately, the use of the scope resolution operator(::) with a variable is not supported until PHP 5.3.0, so this is currently a no-go, unless there's a workaround.","number":59,"url":"https://api.github.com/repos/thomasgriffin/TGM-Plugin-Activation/issues/59","comments":1,"assignee":null},"action":"closed"}