Download the PHP package vincentvdree/tesserae without Composer

On this page you can find all versions of the php package vincentvdree/tesserae. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tesserae

Tesserae

A code-first block editor for WordPress. Blocks are folders in your theme, editing happens on the live page, and none of it goes through Gutenberg or ACF.

Drop that folder in, reload the page, and the block is in the picker.

Full documentation — a five-minute quick start plus references for blocks, fields, hooks and REST — lives in docs/.

Why

Page builders keep the structure of a site in the database, where it cannot be reviewed, diffed or deployed. Tesserae keeps it in the repository: a developer defines what a block is, which fields it has and where it may be used; an editor arranges those blocks on the page itself and sees the real thing while typing.

Requirements

Installation

Via Composer (recommended):

Or download the latest release and drop the tesserae directory into your wp-content/plugins/ (or, on a Bedrock install, web/app/plugins/). Then activate it like any other plugin. It ships no wp-admin screens — the only thing it needs from a theme is a blocks/ directory (and, optionally, an option-pages/ one).

Getting started

  1. Activate the Tesserae plugin.
  2. Create blocks/ in your theme and add a block folder (or run wp tesserae scaffold my_block).
  3. Call tesserae_render() in page.php:

  4. Open a page and click Edit with Tesserae in the admin bar (or add ?tesserae=edit to the URL).

The template sections below walk through a complete hero block, field by field.

Editing

Edit mode is a query parameter (?tesserae=edit) available to anyone with edit_post on that page.

Nothing is written until you save. The whole page is one JSON document in the _tesserae_blocks post meta, plus a flattened text copy in _tesserae_text so WordPress search still finds block content.

The config file

Conditional operators: ==, !=, >, <, contains, in, empty, not_empty. Multiple rules are ANDed; use conditional: {relation: or, rules: [...]} for the other case.

See docs/fields.md for every field type and its options.

The template

Templates are plain PHP. They receive $block (a BlockContext), $fields (the prepared values), $post and $editing.

Values arrive prepared: an image field is an array with url, alt, srcset and friends, a posts field is a list of WP_Post objects, a link field is ['url', 'title', 'target', 'rel'], a repeater is a list of rows.

Template API

Function Description
tesserae_render(?int $post_id) Renders all blocks of a post.
tesserae_get_render(?int $post_id) Same, returned as a string.
tesserae_has_blocks(?int $post_id) Whether the post has any blocks.
tesserae_blocks(?int $post_id) The raw BlockInstance list (ids, types, values).
tesserae_block() The block being rendered, or null.
tesserae_field($path, $default) A prepared value; dot paths work (cta.link.url).
tesserae_has_field($path) Value is present and not empty.
tesserae_the_field($path) Echoes a scalar value, escaped.
tesserae_editable($field) Marks an element as the entry point for one field.
tesserae_image($value, $attrs) / tesserae_the_image() <img> from an image value.
tesserae_link_attrs($value) / tesserae_the_link_attrs() href/target/rel from a link value.
tesserae_is_editing() / tesserae_edit_url() Edit mode helpers.
tesserae_option($page, $path, $default) A prepared value from an options page; dot paths work.
tesserae_has_option($page, $path) / tesserae_the_option($page, $path) Presence check and escaped echo, mirroring the field helpers above.

Options pages

Global values that do not belong to any single page — a phone number, social links, footer text — get their own YAML file instead of a block folder:

Editing still happens on the front end, not in wp-admin: while a page is open in edit mode, a Site Options item appears in the admin bar and opens a dialog for it, built from the same field types and panel CSS a block uses. Read the full picture, including storage and WP-CLI, in docs/options.md.

Block scripts

Drop a hero.js next to hero.php and it is loaded as a native ES module whenever the hero block is on the page — nothing to register in YAML, nothing enqueued by hand.

It runs on its own; Tesserae does not assume anything about its contents or wire it into data-controller. If you want a Stimulus controller, register it yourself against the shared application instance:

Stimulus itself ships with the plugin and is mapped through the WordPress import map, so there is nothing to install and nothing to bundle.

Variants

File When it is used
name.php Normally.
name_edit.php While the page is in edit mode — useful for blocks whose output is a live query.
name_robot.php For crawlers and AI agents (user-agent based, tesserae/is_robot decides).

WP-CLI

Extending

Field types are PHP classes. Extend Tesserae\Fields\Field, implement type() and renderControl(), and register it:

Blocks can come from anywhere, not just the theme:

Every hook is listed in docs/hooks.md.

What it deliberately does not do

Uninstalling

Deactivating (or deleting) the plugin leaves your content alone: block documents stay in post meta and options pages stay in the options table, so reactivating it picks up where you left off. Removing them is a deliberate act (wp post meta delete <id> _tesserae_blocks, wp option delete tesserae_options_<slug>), never a side effect.

Contributing

Issues and pull requests are welcome at github.com/vincentvdree/tesserae. If you're proposing a non-trivial change, open an issue first so we can talk through the approach before you put the work in.

Licence

GPL-3.0-only, see LICENCE.


All versions of tesserae with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vincentvdree/tesserae contains the following files

Loading the files please wait ...