1. Go to this page and download the library: Download ttskch/esaba 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/ */
ttskch / esaba example snippets
// config/esaba.php
return json_encode([
// ...
// empty to publish all
'ESABA_PUBLIC_CATEGORIES' => json_encode([
// 'path/to/category1',
// 'path/to/category2',
]),
'ESABA_PUBLIC_TAGS' => json_encode([
// 'tag1',
// 'tag2',
]),
// takes priority of over ESABA_PUBLIC_CATEGORIES
'ESABA_PRIVATE_CATEGORIES' => json_encode([
// 'path/to/category1/subcategory1',
// 'path/to/category1/subcategory2',
]),
// takes priority of over ESABA_PUBLIC_TAGS
'ESABA_PRIVATE_TAGS' => json_encode([
// 'tag3',
// 'tag4',
]),
]);
// config/esaba.php
return json_encode([
// ...
// if post matches multiple conditions, tag based condition taks priority of over category based condition
// if post matches multiple category based conditions, condition for deeper category is enabled
// if post matches multiple tag based conditions, any arbitrarily one is enabled
'ESABA_USER_ASSETS' => json_encode([
'path/to/category' => [
'css' => 'css/your-own.css',
'js' => 'js/your-own.js',
],
'#tag_name' => [
'css' => 'css/your-own.css',
// if one of "css" or "js" is omitted, default.(css|js) is used
],
]),
]);