A plugin to write Object-Oriented code in combination with the Twig templating engine while keeping the WordPress Way of working in mind.
Composer, that's it.
Here is a brief explanation of the basics of Clarkson Core.
Uses the internal Template Hierarchy so you can replace index.php
with index.twig
or archive-company.php
with archive-company.twig
and still have all Posts or CPT's available in "The Loop".
{% extends "layouts/full-width.twig" %}
{% block content %}
{% for object in objects %}
{% include 'partials/teaser.twig' %}
{% endfor %}
{% endblock %}
It autoloads a default Clarkson Object that is just like WP_Post
but with some more handy stuff.
When you register a Custom Post Type ll_company
your custom class ll_company
gets loaded in the Twig context as objects
variable within the archive-company.twig
.
More info about WordPress objects.
Currently
- Clone repository
[email protected]:level-level/Clarkson-Core.git clarkson-core
. - Run
composer install
in the newclarkson-core
directory. - Run
composer run test
.