PHP code example of dxw / iguana-theme
1. Go to this page and download the library: Download dxw/iguana-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/ */
dxw / iguana-theme example snippets
namespace Dxw\MyTheme;
class MyClass implements \Dxw\Iguana\Registerable
{
private $helpers;
public function __construct(\Dxw\Iguana\Theme\Helpers $helpers)
{
$this->helpers = $helpers;
}
public function register()
{
$this->helpers->registerFunction('myFunc', [$this, 'myFunc']);
}
public function myFunc($a)
{
echo esc_html($a + 1);
}
}
h()->myFunc(4)
<!doctype html>
<html>
<head>
...
</head>
<body>
h()->w_requested_template()