Title: Jinx-Block-Renderer
Author: Lukas Rydygel
Published: <strong>12 Agosto 2020</strong>
Last modified: 3 Dicembre 2020

---

Ricerca i plugin

![](https://ps.w.org/jinx-block-renderer/assets/banner-772x250.jpg?rev=2358346)

Questo plugin **non è stato testato con le ultime 3 versioni principali (major releases)
di WordPress**. Potrebbe non essere più mantenuto, o supportato, e potrebbe presentare
problemi di compatibilità se utilizzato con versioni più recenti di WordPress.

![](https://ps.w.org/jinx-block-renderer/assets/icon-256x256.png?rev=2358346)

# Jinx-Block-Renderer

 Di [Lukas Rydygel](https://profiles.wordpress.org/lugat/)

[Scarica](https://downloads.wordpress.org/plugin/jinx-block-renderer.zip)

 * [Dettagli](https://it.wordpress.org/plugins/jinx-block-renderer/#description)
 * [Recensioni](https://it.wordpress.org/plugins/jinx-block-renderer/#reviews)
 *  [Installazione](https://it.wordpress.org/plugins/jinx-block-renderer/#installation)
 * [Sviluppo](https://it.wordpress.org/plugins/jinx-block-renderer/#developers)

 [Supporto](https://wordpress.org/support/plugin/jinx-block-renderer/)

## Descrizione

The plugin allows you to parse all kinds gutenberg blocks and render them in your
own template.

### Usage

Use the filter ‘jinx_block_renderers’ in your theme to render gutenberg blocks.

    ```
    <?php

      function my_render_function(array $fields)
      {
        echo $fields['url'];
      }

      add_filter('jinx_block_renderers', function($renderers) {

        $renderers[] = [
          'block' => 'core-embed/youtube', // name of the block
          'conditions' => [], // default - accepts an array of key value pairs
          // 'conditions' => [
          //   'className' => 'is-style-custom', // strings are used inside a regular expression
          //   'field' => function($value) { // callbacks will receive the fields value and must return true or false
          //     return $value === 'some value';
          //   }
          // ],
          'fields' => [
            'url' => [ // name of your parameter
              'path' => '//iframe[@src]',
              'item' => 0,
              // 'item' => 9, // if not exists, will return null
              // 'item': 'first', // constant Jinx\BlockRenderer\Field::ITEM_FIRST
              // 'item': 'last', // constant Jinx\BlockRenderer\Field::ITEM_LAST
              // 'item': null // default - returns all results as an array
              'attr' => 'src',
              //'attr' => null // default - returns the results value
              //'filter' => 'my_filter_function' // filters each matched field
            ],
          ],
          // 'insert' => '//*[contains(@class,"wp-block-")]' // default - inserts rendered block back into the block-wrapper
          'template' => __DIR__.'/youtube-video.php', // relative path, templates will handle each field as a variable
          // 'callback' => 'my_render_function'
        ];

        return $renderers;

      });

    ?>
    ```

## Installazione

 1. Unzip the downloaded package
 2. Upload `jinx-block-renderer` to the `/wp-content/plugins/` directory
 3. Activate the plugin through the ‘Plugins’ menu in WordPress

## Recensioni

Non ci sono recensioni per questo plugin.

## Contributi e sviluppo

“Jinx-Block-Renderer” è un software open source. Le persone che hanno contribuito
allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

 *   [ Lukas Rydygel ](https://profiles.wordpress.org/lugat/)

[Traduci “Jinx-Block-Renderer” nella tua lingua.](https://translate.wordpress.org/projects/wp-plugins/jinx-block-renderer)

### Ti interessa lo sviluppo?

[Esplora il codice](https://plugins.trac.wordpress.org/browser/jinx-block-renderer/)
segui il [repository SVN](https://plugins.svn.wordpress.org/jinx-block-renderer/),
segui il [log delle modifiche](https://plugins.trac.wordpress.org/log/jinx-block-renderer/)
tramite [RSS](https://plugins.trac.wordpress.org/log/jinx-block-renderer/?limit=100&mode=stop_on_copy&format=rss).

## Meta

 *  Versione **0.2.0**
 *  Ultimo aggiornamento **6 anni fa**
 *  Installazioni attive **10+**
 *  Versione WordPress ** 5.0 o superiore **
 *  Testato fino alla versione **5.5.18**
 *  Versione PHP ** 7.1 o superiore **
 *  Lingua
 * [English (US)](https://wordpress.org/plugins/jinx-block-renderer/)
 * Tag
 * [blocks](https://it.wordpress.org/plugins/tags/blocks/)[gutenberg](https://it.wordpress.org/plugins/tags/gutenberg/)
   [manipulate](https://it.wordpress.org/plugins/tags/manipulate/)[template](https://it.wordpress.org/plugins/tags/template/)
 *  [Visualizzazione avanzata](https://it.wordpress.org/plugins/jinx-block-renderer/advanced/)

## Valutazioni

Non sono state ancora inviate recensioni.

[Your review](https://wordpress.org/support/plugin/jinx-block-renderer/reviews/#new-post)

[Vedi tutte le recensioni](https://wordpress.org/support/plugin/jinx-block-renderer/reviews/)

## Collaboratori

 *   [ Lukas Rydygel ](https://profiles.wordpress.org/lugat/)

## Supporto

Hai qualcosa da dire? Ti serve aiuto?

 [Chiedi nel forum di supporto](https://wordpress.org/support/plugin/jinx-block-renderer/)