Docs: Upgrading from 1.16
Upgrading from 1.16
Five habits from 1.16 themes worth replacing, and the call to use instead of each.
Nothing breaks: every call that was there is unchanged. Five habits are worth replacing.
- A query of the
settingstable for the name or the social links: use$this->site(). !empty($_SESSION['UserID']): use$this->visitor()['signed_in'], withaccount_urlandlogin_url.- Formatting a date with a time zone of your own: use
$this->date($value, 'short'). - Reading
$_GET['page']or$_SERVER['REQUEST_URI']: use$this->query('page', 'int', 1)and$this->currentUrl(['page' => $n]). html_entity_decode()on an item'simagebefore an<img>: use$this->picture($item).
The longer guide to writing a theme is Themes.