• Stars
    star
    690
  • Rank 65,309 (Top 2 %)
  • Language
    PHP
  • License
    GNU General Publi...
  • Created over 12 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Official repository for the Hybrid Core WordPress development framework.

Hybrid Core: WordPress Framework

Hybrid Core is a framework for developing WordPress plugins and themes.

The core package is the application layer that primarily consists of a service container. It can be used alone or alongside any of the available Hybrid packages.

The framework simplifies many of the complexities of WordPress development and helps you write more modern PHP code. Its goal is to provide elegant functions, classes, and interfaces for writing code without the need to rebuild everything from scratch with each project.

Requirements

  • WordPress 5.7+
  • PHP 7.0+
  • Composer 2.0+

Donations

Hybrid Core is free. However, donations to the project are also welcome.

Documentation

The documentation is handled via Hybrid Core's wiki. This is community-contributed documentation that I hope you will add to if you use the framework.

Installation

Use the following command from your preferred command line utility to install the package.

composer require themehybrid/hybrid-core

If bundling this directly in your plugin, add the following code.

For plugins:

if ( file_exists( 'vendor/autoload.php' ) ) {
        require_once 'vendor/autoload.php';
}

For themes:

if ( file_exists( get_parent_theme_file_path( 'vendor/autoload.php' ) ) ) {
	require_once( get_parent_theme_file_path( 'vendor/autoload.php' ) );
}

Bootstrapping Hybrid Core

Hybrid Core isn't launched until an instance of its Hybrid\Core\Application class is created and its boot() method has been called.

Because the Application class can be called multiple times via both plugins and themes, developers need to check the Hybrid\booted() function before attempting to create a new app. If one exists, they should use the existing instance via the Hybrid\app() helper function.

// Create a new application.
$slug = \Hybrid\booted() ? \Hybrid\app() : new \Hybrid\Core\Application();

// Add service providers.
$slug->provider( \YourProject\Provider::class );

// Bootstrap the application.
$slug->boot();

Copyright and License

This project is licensed under the GNU GPL, version 2 or later.

2008 – 2021 © Justin Tadlock.

More Repositories

1

mythic

Mythic is a next-generation starter theme designed to help theme authors write elegant, intelligent, and modern code.
PHP
237
star
2

hybrid-breadcrumbs

Breadcrumbs. Yummy!
PHP
45
star
3

hybrid-carbon

Recreation of the original Get the Image script for WordPress.
PHP
20
star
4

hybrid-font

Standardized set of helper functions for loading Google Fonts in WordPress themes.
PHP
13
star
5

hybrid-customize

Add-on for the Hybrid Core framework that provides customizer controls and settings.
PHP
13
star
6

hybrid-mix

Helper class for working with Laravel Mix in WordPress themes and plugins.
PHP
10
star
7

theme-designer

A plugin to allow theme authors and companies to manage their theme portfolios.
PHP
5
star
8

hybrid-tools

Tools for Hybrid Core.
PHP
5
star
9

plugin-developer

A plugin for plugin developers. Sister project of Theme Designer.
PHP
4
star
10

hybrid-svg

PHP
4
star
11

hybrid-view

Hybrid View is an add-on for Hybrid Core framework. It's used for setting up and rendering theme template files. Views are a bit like a suped-up version of the core WordPress get_template_part() function.
PHP
4
star
12

hybrid-theme

Hybrid Core theme related code.
PHP
3
star
13

hybrid-template-manager

Custom template manager.
PHP
2
star
14

hybrid-template

Template management system for Hybrid Core.
PHP
2
star
15

hybrid-media-meta

Displays media metadata.
PHP
2
star
16

hybrid-lang

Language management for Hybrid Core framework, which deals with loading textdomains and locale-specific function files.
PHP
1
star
17

hybrid-pagination

Hybrid Core Pagination Package
PHP
1
star
18

hybrid-contracts

Contracts for Hybrid Core.
PHP
1
star
19

hybrid-media-grabber

Grabs media from a post.
PHP
1
star
20

hybrid-template-hierarchy

Template Hierarchy management system for Hybrid Core.
PHP
1
star
21

hybrid-attr

Hybrid Attribute Package is an add-on for Hybrid Core. The purpose is to provide devs a system for adding filterable attributes. This is sort of like body_class(), post_class(), and comment_class() on steroids.
PHP
1
star