Skip to content

ZwaarContrast/Clarkson-Core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clarkson Core

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

Requirements

Composer, that's it.

Whats does What?

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".

Autoloading of Object classes per Custom Post Type.

It autoloads a default Object 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 objects variable within archive-company.twig.

Adding your own objects

Loading your own objects can be done in two ways:

  1. Per complete directory by adding it via the filter clarkson_available_objects_paths.
  2. Per single object / class file via clarkson_available_objects.

Our advice is you extend your new class with Clarkson_Object.

Installation

  1. Clone repository or download zip.
  2. Run composer install in the Core directory.

Theme Development

Should work out of the box with an empty theme or use the starter theme Clarkson Theme

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%