Move required theme files to sage/resources

* Resolves issue with WP only looking one-level deep for templates #1870
* get_template_dir() and related functions now point to sage/resources
* Use collect() when assembling views paths
* Update tree in README
This commit is contained in:
QWp6t
2017-04-14 01:23:42 -07:00
parent bea1b34322
commit 99160be992
10 changed files with 54 additions and 45 deletions

View File

@@ -53,31 +53,31 @@ During theme installation you will have the options to:
```shell
themes/your-theme-name/ # → Root of your Sage based theme
├── app/ # → Theme PHP
   ├── lib/Sage/ # → Blade implementation, asset manifest
   ├── admin.php # → Theme customizer setup
   ├── filters.php # → Theme filters
   ├── helpers.php # → Helper functions
   └── setup.php # → Theme setup
├── lib/Sage/ # → Blade implementation, asset manifest
├── admin.php # → Theme customizer setup
├── filters.php # → Theme filters
├── helpers.php # → Helper functions
└── setup.php # → Theme setup
├── composer.json # → Autoloading for `app/` files
├── composer.lock # → Composer lock file (never edit)
├── dist/ # → Built theme assets (never edit)
├── functions.php # → Composer autoloader, theme includes
├── index.php # → Never manually edit
├── node_modules/ # → Node.js packages (never edit)
├── package.json # → Node.js dependencies and scripts
├── screenshot.png # → Theme screenshot for WP admin
├── style.css # → Theme meta information
├── resources/ # → Theme assets and templates
│ ├── assets/ # → Front-end assets
   │ ├── config.json # → Settings for compiled assets
   │ ├── build/ # → Webpack and ESLint config
   │ ├── fonts/ # → Theme fonts
   │ ├── images/ # → Theme images
   │ ├── scripts/ # → Theme JS
   │ └── styles/ # → Theme stylesheets
   └── views/ # → Theme templates
   ├── layouts/ # → Base templates
   ── partials/ # → Partial templates
│ ├── config.json # → Settings for compiled assets
│ ├── build/ # → Webpack and ESLint config
│ ├── fonts/ # → Theme fonts
│ ├── images/ # → Theme images
│ ├── scripts/ # → Theme JS
│ └── styles/ # → Theme stylesheets
├── functions.php # → Composer autoloader, theme includes
│ ├── index.php # → Never manually edit
── screenshot.png # → Theme screenshot for WP admin
│ ├── style.css # → Theme meta information
│ └── views/ # → Theme templates
│ ├── layouts/ # → Base templates
│ └── partials/ # → Partial templates
└── vendor/ # → Composer packages (never edit)
```