Giter Site home page Giter Site logo

jimmitjoo / wordpress-theme-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from justcoded/wordpress-theme-boilerplate

0.0 2.0 0.0 2.61 MB

WordPress theme boilerplace with improved classes-based code structure, theme wrapper and security patches

PHP 74.04% CSS 25.96%

wordpress-theme-boilerplate's Introduction

WordPress Theme Boilerplate

This package contains Theme Boilerplate, which has a lot of improvements and security patches, according to standard WordPress theme boilerplates (like underscore, etc.). The code is object-oriented and works with PSR-4 autoload.

Requirements

Theme core files (base classes) are presented as separate wordpress plugin package called WordPress Theme Framework. They were moved as a plugin to provide easier support and updates population through different site installations.

This solution makes possible to deliver new updates and hot fixes without modifying the theme code.

What's Inside?

Better File Structure

The organization of a theme is very similar to modern PHP Frameworks. We totally separated registration of hooks and components, query logic, and the templates.

We tried to keep as much standard WordPress features as possible, so all "views" work in the same Template Hierarchy as standard templates, just grouped by content types (with folders).

File structure

Template Inheritance

We added modern template inheritance system based on layouts (very similar to Laravel and Yii frameworks). Some WordPress developers call it a "Theme Wrapper". Markup is handled by one layout file (or more if needed) instead of being scattered across all template files as in typical themes. Stay DRY!

Security and Optimization

Theme files are nice and clean, and Theme Framework has a lot of hooks to make your WordPress more secure and keep the final generated HTML clean and optimized.

Documentation

Read our Wiki to find out all features.

wordpress-theme-boilerplate's People

Contributors

aprokopenko avatar mzhirov avatar ookhrimenko avatar

Watchers

James Cloos avatar Jimmie Johansson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.