Closed mallorydxw closed 8 years ago
Iguana would be a good name. Fairly short. It's also not whippet-something
which is a definite plus. Only one other package with a similar name on packgist.
Source of the name: http://shop.oreilly.com/product/0636920029380.do?sortby=publicationDate
There is one other WP-related thing named Iguana: http://themeforest.net/item/iguana-responsive-multipurpose-wordpress-theme/5239597
But the logo looks nothing like an iguana. Clearly something closer to a gecko.
After moving code to iguana - move code specific to themes into src/Theme
and any plugin-specific code into src/Plugin
.
"iguana theme and plugin framework for WordPress" sounds like a good short description
or "iguana - the extensible theme and plugin framework for WordPress"
We can layout the Iguana code as src/Theme
and src/Plugin
, and add anything else as we go.
src/Theme
in iguanaapp
├── CoreBehaviour.php - THEME
├── di.php - TMPL
├── Helpers.php - IGUANA
├── Lib
│ ├── RootsWalkerComment.php - THEME
│ └── Whippet
│ ├── Layout.php - THEME
│ └── TemplateTags.php - THEME
├── load.php - TMPL
├── Posts
│ ├── CustomFields.php - TMPL
│ └── PostTypes.php - TMPL
├── Registerable.php - IGUANA
├── Registrar.php - IGUANA
├── SuperglobalGet.php - IGUANA (Superglobal/Get)
├── Superglobal.php - IGUANA (Superglobal/Base) - should be named generically as we'll add constants based on this class
├── SuperglobalPost.php - IGUANA (Superglobal/Post)
└── Theme
├── Helpers.php - THEME (requires modifications - should look for constant - and the constant should be provided via a Superglobal-type class)
├── Media.php - TMPL
├── Menus.php - TMPL
├── Pagination.php - TMPL?
├── Scripts.php - THEME
├── Titles.php - TMPL?
├── TitleTag.php - THEME
└── Widgets.php - TMPL
Or should iguana
just provide the bare framework, and the theme-related components are in iguana-theme
? Would perhaps be cleaner, and would help to keep each repo focussed and concentrated.
We could include in iguana
a command vendor/bin/iguana
which could be used as a generator for new themes/plugins (i.e. take over that role from whippet
). And could also generate new classes in the appropriate style (take over the role of git@git.dxw.net:tools/generator-dxwwp
).
vendor/bin/iguana init --theme
=> sets up a theme in this directoryvendor/bin/iguana init --plugin
=> sets up a plugin in this directoryvendor/bin/iguana class foo/bar
=> creates a test and a class to go with itBut maybe we're getting ahead of ourselves. At any rate, that should probably live in a separate repository to iguana
itself. Maybe that could be iguana-cmd
.
TMPL = belongs in the template forever because it's a bit of placeholder code meant to be replaced by a theme author
STABLE = hasn't been modified in a long time, isn't likely to be modified any time soon, and is well-used
THEME = will be moved to iguana-theme eventually
CORE = important core functionality of iguana-theme
app
├── CoreBehaviour.php - THEME => \Dxw\Iguana\Theme\UseAtom
├── Lib
│ ├── RootsWalkerComment.php - TMPL
│ └── Whippet
│ ├── Layout.php - STABLE THEME CORE => \Dxw\Iguana\Theme\Layout
│ ├── LayoutRegister.php - THEME CORE => \Dxw\Iguana\Theme\LayoutRegister
│ └── TemplateTags.php - we should move w_requested_template into Layout.php - but otherwise TMPL (see feature/tests)
├── Posts
│ ├── CustomFields.php - TMPL
│ └── PostTypes.php - TMPL
└── Theme
├── Helpers.php - TMPL for the moment
├── Media.php - TMPL
├── Menus.php - TMPL
├── Pagination.php - TMPL?
├── Scripts.php - THEME => \Dxw\Iguana\Theme\Assets
├── TitleTag.php - THEME
└── Widgets.php - TMPL
Note that Layout
is based on some roots code, that lives here: https://github.com/roots/sage/blob/8d7bcee4c46173d11dd8ea9a06021d8c27891b64/lib/wrapper.php
I looked at Sage to see if a) it had unit tests, and b) we could reuse the code by requiring a composer module. No on both counts, so let's stick with what we have here.
There are a few files like PostTypes and CustomFields which should stay. Should all live inside one directory in
app/
.iguana
repo and put all the core functionality in there. Namespace:\Dxw\Iguana
- see #28app/
in this repo (and add some general improvements)iguana-theme
repo and put all the theme-related functionality in there, depend oniguana
. Namespace:\Dxw\Iguana\Theme
iguana
andiguana-theme
, and rename any updated classes