Download the PHP package wordpress-phoenix/abstract-theme-base without Composer
On this page you can find all versions of the php package wordpress-phoenix/abstract-theme-base. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wordpress-phoenix/abstract-theme-base
More information about wordpress-phoenix/abstract-theme-base
Files in wordpress-phoenix/abstract-theme-base
Package abstract-theme-base
Short Description PHP class to extend when building a WordPress theme allowing you to follow smart theme setup standards.
License GPL-3.0-or-later
Homepage https://github.com/WordPress-Phoenix/abstract-theme-base
Informations about the package abstract-theme-base
Abtract Theme Base
Used as a base class to help standardize the way we build WordPress themes.
Table of Contents
- Installation
- Usage
Installation
You can use this library to start a new theme from scratch, or you can enhance your existing themes with this library. Once you have read over the installation instructions it should make sense which direction to go.
Composer style (recommended)
- Confirm that composer is installed in your development environment using
which composer
. If CLI does not print any path, you need to install Composer. - Set CLI working directory to wp-content/themes/{your-theme-name}
-
Install Abstract_Theme class via composer command line like
- Look at sample code below to see how to include this library in your theme.
Manual Installation
- Download the most updated copy of this repository from
https://api.github.com/repos/WordPress-Phoenix/abstract-theme-base/zipball
- Extract the zip file, and copy the PHP file into your theme project.
- Include the file in your theme.
Usage
Why should you use this library when building your theme?
By building your theme using OOP principals, and extending this Theme_Base class object, you will be able to quickly and efficiently build your theme, allowing it to be simple to start, but giving it the ability to grow complex without changing its architecture.
Immediate features include:
- Built in SPL Autoload for your includes folder, should you follow WordPress codex naming standards for class files.
- Template class provides you all the best practices for standard theme initialization
- Minimizes code needed / maintenance of your main theme file.
- Assists developers new to WordPress theme development in file / folder architecture.
- By starting all your themes with the same architecture, we create a standard that is better for the dev community.
Simplest example of the main theme functions file, and required theme class file
custom-my-theme.php
:
app/class-theme.php
: