1. Go to this page and download the library: Download moxie-lean/lean-theme library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Lean\Load;
// Example of loading an organism located in patterns/organisms/hero/hero.php
Load::organism(
'hero/hero', [
'bg_image_url' => $bg_image_url,
'show_header' => true,
]
);
// Example of loading an atom located in patterns/atoms/buttons/button.php
Load::atom(
'buttons/button', [
'label' => $label,
'link' => $url,
]
);
namespace Lean\Backend\MyModule;
class MyModule {
public static function init() {
// This code is executed automatically by the loader.
}
}
namespace Lean\Backend\WP\CPT\Invoices;
use Lean\Cpt;
class Invoices {
const TYPE = 'invoices';
public static function init() {
// This code is executed automatically by the loader.
add_action( 'init', [ __CLASS__, 'register_cpt' ] );
}
public static function register_cpt() {
$invoices = new Cpt(
[
'singular' => 'Invoice',
'plural' => 'Invoices',
'post_type' => self::TYPE,
'slug' => 'invoice',
'supports' => [
'title',
],
'args' => [
'menu_icon' => 'dashicons-media-text',
],
]
);
$invoices->init();
}
}
lean/before_header
lean/after_header
lean/before_footer
lean/after_footer
lean/acf_path
lean/acf_use_custom_location
bash
MyModule/MyModule.php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.