1. Go to this page and download the library: Download offset/packs 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/ */
offset / packs example snippets
use Offset\Pack;
use Offset\Packs;
class PackDemo extends Pack
{
public $title = 'Demo';
public $name = 'demo';
public $version = '1.0.0';
public $dir = __DIR__ . '/blocks';
public $url = '/wp-content/plugins/offset-demo/blocks';
public $editor_styles = array(
array(
'handle' => 'offset-demo-editor-style',
'src' => '/wp-content/plugins/offset-demo/assets/css/admin.css',
),
);
public $editor_scripts = array(
array(
'handle' => 'offset-demo-editor-script',
'src' => '/wp-content/plugins/offset-demo/assets/js/admin.js',
),
);
public $styles = array(
array(
'handle' => 'offset-demo-style',
'src' => '/wp-content/plugins/offset-demo/assets/css/style.css',
),
);
public $scripts = array(
array(
'handle' => 'offset-demo-script',
'src' => '/wp-content/plugins/offset-demo/assets/js/script.js',
),
);
}
$packs_manager = Packs::getInstance();
$pack_demo = new PackDemo();
$packs_manager->addPack($pack_demo);