PHP code example of vincentvdree / tesserae

1. Go to this page and download the library: Download vincentvdree/tesserae 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/ */

    

vincentvdree / tesserae example snippets


 get_header(); 

 /** @var Tesserae\Blocks\BlockContext $block */ 

add_filter('tesserae/field_types', function (array $types): array {
    $types['icon'] = MyIconField::class;

    return $types;
});

add_filter('tesserae/block_sources', function (array $sources): array {
    $sources[__DIR__.'/blocks'] = plugins_url('blocks', __FILE__);

    return $sources;
});