§1
Core principle
A theme is only the presentation layer. It cannot reach the database, the session, the file system, the request data or core classes. Each page's data is prepared by a presenter in the core and handed to the theme as a plain array. The theme shows that data with whatever HTML it likes.
- Permissions, prices, stock and form validation always live on the server. A theme cannot change them.
- Templates use the
.wcpextension and Blade syntax. The web server never serves.wcpor.phpfiles directly (403). - A theme passes the validator (§8) before it is activated and every time it loads. A theme that fails cannot be activated. If an active theme breaks later (for example it is changed over FTP), the site keeps opening with the core views.