Home - nikonorovsv/wpf GitHub Wiki
WPF is a WordPress Framework to make your creating of theme easy.
Quick Start
- Install Composer.
- Move to the theme folder:
cd {WP_path}/wp-config/themes/{theme_name}
- Create composer.json file and add WPF requires like this:
{
"autoload": {
"psr-4": {
"wpf\\": "vendor/nikonorovsv/wpf/",
"app\\": "app/"
}
},
"require": {
"nikonorovsv/wpf": "dev"
},
"repositories":[
{
"type":"package",
"package":{
"name":"nikonorovsv/wpf",
"version":"dev",
"source":{
"type":"git",
"url":"http://github.com/nikonorovsv/wpf",
"reference":"master"
}
}
}
]
}
- Run
composer install
- Create your app.config.json into theme base directory.
- Open your functions.php and create your App:
get_template_part( 'vendor/autoload' );
get_template_part( 'vendor/nikonorovsv/wpf/functions' );
$conf = [
'vendor/nikonorovsv/wpf/wpf.config.json',
'app.config.json'
];
$app = app();
$app->loadAttributes( $app::readJsonConf( $conf ) );
$app->applyObservers();