Skip to content
A plugin to write Object-Oriented code in combination with the Twig templating engine while keeping the WordPress Way of working in mind.
PHP Shell HCL
Branch: master
Clone or download
Latest commit cc1f9ef Aug 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Updates documentation and return types Aug 19, 2019
bin run composer install no-dev with build script Jun 7, 2017
lib
tests
wordpress-objects
.gitignore
.travis.yml Merge remote-tracking branch 'origin/master' into feature/psalm Aug 5, 2019
README.md
clarkson-core.php Fixes whitespace issues Aug 19, 2019
composer.json Merge remote-tracking branch 'origin/master' into feature/psalm Aug 5, 2019
composer.lock
hookdoc-conf.json Adds documentation and deploy workflow Aug 9, 2019
package-lock.json Adds filter documentation Aug 9, 2019
package.json Adds filter documentation Aug 9, 2019
phpcs.xml.dist
phpunit.xml.dist
psalm.xml Merge remote-tracking branch 'origin/master' into feature/psalm Aug 5, 2019
readme.txt Fixes #165, returning incorrect null value Aug 19, 2019

README.md

Build Status

Clarkson Core

A plugin to write Object-Oriented code in combination with the Twig templating engine while keeping the WordPress Way of working in mind.

Requirements

Composer, that's it.

Whats does What?

Here is a brief explanation of the basics of Clarkson Core.

Template Hierachy

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 %}

Autoloading of WordPress-object classes per Custom Post Type.

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.

More documentation

Tests

Currently

  1. Clone repository git@github.com:level-level/Clarkson-Core.git clarkson-core.
  2. Run composer install in the new clarkson-core directory.
  3. Run composer run test.
You can’t perform that action at this time.