Download the PHP package flyntwp/flynt-core without Composer
On this page you can find all versions of the php package flyntwp/flynt-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flyntwp/flynt-core
More information about flyntwp/flynt-core
Files in flyntwp/flynt-core
Package flynt-core
Short Description The Flynt Core Plugin provides a small public interface, combined with several WordPress hooks, to achieve the main principles of the Flynt Framework.
License MIT
Homepage https://github.com/flyntwp/flynt-core
Informations about the package flynt-core
flynt-core
The core building block of the Flynt Framework.
The Flynt Core WordPress plugin provides a small public interface, combined with several WordPress hooks, to achieve the main principles of the Flynt Framework.
:warning: DEPRECATED. This repository is no longer in active development. For the latest version of Flynt please use the new Flynt repository. :warning:
Table of Contents
- Background
- Install
- Usage
- Maintainers
- Contribute
- License
Background
This plugin essentially functions as a HTML generator with two key steps:
- Given a minimal configuration, the Flynt Core plugin creates a hierarchical plan for how the site will be constructed (the Construction Plan).
- The Construction Plan is parsed and rendered into HTML.
Each configuration passed to the plugin represents a single component. This configuration can also contain additional, nested component configurations, which are contained within "areas".
Install
To install via composer, run:
Activate the plugin in the WordPress back-end and you're good to go.
Usage
Hello World
To see the simplest way of using Flynt Core, add the following code to your theme's functions.php
:
This defines a new component ('HelloWorld'), which when rendered, will output the text 'Hello, world!'.
To render the component, add the following code to your theme's index.php
:
Initialize Default Settings
We recommend initializing the plugin's default settings. Do this by adding the following line of code to your theme's functions.php
:
This will:
- Implement the component structure.
- Load component scripts.
- Enable PHP file rendering.
This also adds the following hooks:
With the 'Flynt/renderComponent' filter added above you can now use the following helper functions in your template files:
$data
is used to access the component's data in the view template.$area
is used to include the HTML of an area's components into the components template itself.
You can read the full documentation here.
Maintainers
This project is maintained by bleech.
The main people in charge of this repo are:
Contribute
To contribute, please use GitHub issues. Pull requests are accepted. Please also take a moment to read the Contributing Guidelines and Code of Conduct.
If editing the README, please conform to the standard-readme specification.
License
MIT © bleech