Block Lab

Descripción

Gutenberg, the new WordPress editor, opens up a whole new world for the way we build pages, posts, and websites with WordPress. Block Lab makes it easy to harness Gutenberg and build custom blocks the way you want them to be built. Whether you want to implement a custom design, deliver unique functionality, or even remove your dependence on other plugins, Block Lab equips you with the tools you need to hit “Publish” sooner.

Caracteristicas

Una Experience Familiar

Trabaja dentro del administrador de WordPress con una interfaz que ya conoces.

Block Fields

Agregue desde una lista creciente de campos disponibles a sus bloques personalizados.

Plantillas simples

Deje que el plugin haga el trabajo pesado para que pueda usar las prácticas de desarrollo de WordPress conocidas para crear plantillas de bloques.

Funciones Hechas para Desarrolladores

Funciones fáciles de usar, listas para renderizar y trabajar con los valores almacenados a través de sus campos de bloque personalizados.

Connect with Community

Join The Lab, our free Block Lab Community on Slack. The Lab is our real-time home for sharing resources, learning, and making connections. Learn more.

Links

Contribuir

Consulte Contribución a Block Lab .

Capturas

Instalación

Desde Dentro de WordPress

  • Visita Plugins & gt; Añadir nuevo
  • Buscar “Block Lab”
  • Install the Block Lab plugin
  • Active Block Lab desde su página de Plugins.

A Mano

  • Clone Block Lab en un directorio de trabajo con https://github.com/getblocklab/block-lab.git
  • cd into the block-lab directory, and run npm install && composer install
  • A continuación, cree los scripts y los estilos con npm build
  • Mueva la carpeta block-lab a su directorio /wp-content/plugins/
  • Active el plugin Block Lab a través del menú Plugins en WordPress

Preguntas frecuentes

P: ¿Necesito escribir codigo par usar este plugin?

R: Aunque el plugin maneja la mayor parte del trabajo en la construcción de un bloque personalizado, tendrá que crear plantillas HTML para mostrar el contenido del bloque. Puedes aprender cómo en la documentación del desarrollador.

P: Tengo una idea para el plugin.

R: Este plugin es de código abierto y solo puede mejorar a través de la contribución de la comunidad. El repositorio de GitHub es aquí.

P: ¿Dónde puedo encontrar documentación para este plugin?

A: Here

Reseñas

14 de agosto de 2020
I have been using it for quite some time and it does the job very well. It is a great tool it saves a lot of time but it needs a few more features to become excellent. For example: There is no multisite support. Any changes must be done on every site (and I have 35). At least I can export and import the Blocks but still, a centralized management would be preferred. Documentation says that Posts field supports CPT's but this is not the case. It only supports either Posts or Pages. And those two can not be combined. It would have been nice to work with both Posts and Pages (and CPT), like the Link field of WordPress. Checkboxes can not be grouped, for a nicer backend layout No 33% column width option No custom text/html can be added without a field. We might want to give instructions to our users or divide/group fields in the backend with titles/subtitles etc. Pasting in Number fields is not possible. Gutenberg gets the pasted number and creates it as a paragraph block, outside of the custom Block. I am using text fields for numbers just to be able to paste id's. Duplicating Blocks keeps them connected. This might have some use, but it would be better if duplicating blocks would create an identical but stand alone block. I know the team is working on future updates and I would be happy to reconsider my rating when time comes. Keep up the good work!
5 de julio de 2020
Admittedly, I never used blocks on my website. I would always just use custom HTML for every post because I have a few advanced elements that I needed to use HTML for. Just started experimenting with blocks last week to try and improve the workflow of making posts and this plugin works really well to help me create and maintain the custom blocks that I need.
11 de junio de 2020
Didn't know about this plugin, but it makes it really easy to use custom Gutenberg Blocks. If you have to make then yourself, it quite hard to setup. Hope the pro version comes out soon though. Thanks!
13 de febrero de 2020
I found this plugin after struggling for a while with the custom approach, which mostly relies on JavaScript. Suddenly I'm able to progress and (importantly) use PHP instead of JS. I really like that I can generate blocks programmatically, which allows (e.g.) select controls to be populated with values from the WP database rather than hard-coded. It's also good to see that I can use the block values to generate a shortcode, which helps to make them easier for users to manage. The templating system for output is neat, and like I said, it means that I can use my PHP/WP skills instead of having to rely on complex JS. Thanks to the authors, and I look forward to seeing how the plugin develops.
7 de febrero de 2020
Really great plugin and easy to use. Nice plugin to create custom gutenberg blocks.
Leer todas las 42 reseñas

Colaboradores y desarrolladores

Este software es de código abierto. Las siguientes personas han contribuido a este plugin.

Colaboradores

"Block Lab" ha sido traducido a 22 idiomas locales. Gracias a los traductores por sus contribuciones.

Traduce "Block Lab" a tu idioma.

¿Interesado en el desarrollo?

Revisa el código, echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

1.5.6 – 2020-08-10

Small bugfixes, improved testing

  • Fix: Prevent a console warning for a prop in WP 5.5
  • New: More JS component tests, and an e2e test

1.5.5 – 2020-04-23

Removed upgrade screen, dependency updates

  • Tweak: By default, the upgrade screen is hidden
  • Tweak: Minor package.json dependency updates for security and reliability

1.5.4 – 2020-03-26

Improved stability, small bugfixes.

  • Fix: Now block_field() returns null if the second argument is true, preventing confusion.
  • New: JavaScript component tests, improving reliability.
  • New: Linting for accessibility issues.

1.5.3 – 2020-01-20

Some UI improvements, bugfixes, and improved stability.

  • Fix: Improved import error feedback, and cleaner methods
  • Fix: Editor bug from @wordpress/nux package being deprecated
  • New: Improved stability, including JS tests and query limit
  • New: Pre-commit hook to lint only staged files

1.5.2 – 2020-02-04

Some small tweaks to the Block Importer and onboarding dialogs.

  • New: Selective import now allows you to choose which of the blocks contained in your export file you’d like to import
  • Fix: Onboarding notices are fixed so that they show in the right places, and at the right times

1.5.1 – 2019-11-11

This is a bugfix release, focused mostly on compatibility with WordPress 5.3.

  • Fix: Themes can now hook into the block_lab_add_blocks action from the functions.php file
  • Fix: Classic Text fields now function as expected when inside a repeater
  • Fix: Rare instances of a NaN error when duplicating fields
  • Fix: Style fixes for the Block Editor in WordPress 5.3

1.5.0 – 2019-10-30

Ready for a big release? We’re really happy to be introducing quite a number of highly requested features, including a PHP API for registering blocks with code, a new text field with lists and headings, and some neat workflow efficiencies when building your block.

  • New: There’s now a PHP API for registering blocks using code (instead of the WP Admin UI). Documentation is here for now, but more on its way soon
  • New: Classic Text control (for Block Lab Pro users)! This field is similar to Rich Text, but has a few extra options for things like lists and headings
  • New: Duplicate fields – building your block is now so much easier, with the ability to duplicate rows
  • New: Repeater Row Count function – a helper function that returns the total amount of rows in a given repeater. Documentation here
  • New: Repeater Row Index function – a helper function that returns the current row, while looping through a repeater. Documentation here
  • Tweak: We’ve removed our dependency on global variables. This is mostly a best practice thing, not user facing. More details here.
  • Tweak: We’ve refactored quite a lot about our block Loader class, to make it more robust, secure, and maintainable
  • Tweak: Loads of new unit and integration tests – these help prevent us from introducing bugs or regressions in the future
  • Fix: Bug which affected sites which had removed or renamed the admin user role
  • Fix: Empty Rich Text fields now no longer output a single </p> tag

1.4.1 – 2019-09-11

You can now add a Minimum and Maximum Rows setting to repeaters, allowing you to specify a lower and upper limit on how many repeater rows can be added.

  • New: The repeater field now includes a minimum and maximum row setting
  • Fix: Location and Width settings are now visible again when adding a new field
  • Fix: Using block_sub_field() with an image now correctly outputs the image URL instead of the ID

1.4.0 – 2019-09-04

This release applies some finishing touches to the repeater field. It also introduces a new “Field Width” feature, which lets you choose the width of the fields as seen in the Editor.

  • New: Function to reset repeater rows: reset_block_rows()
  • New: Add a “Field Width” control to blocks
  • Fix: Empty repeater rows now save and can be moved properly
  • Fix: An issue which occasionally prevented repeater rows from being deleted
  • Fix: Prevent repeated requests to validate a Pro license
  • Tweaks: Add a different admin notice for when a license validation request fails
  • Tweaks: Many new and shiny unit and integration tests, making Block Lab more solid than ever

1.3.6 – 2019-08-22

  • New: 🔁 REPEATER FIELD 🔁
  • New: Conditional Blocks, based on Post Type
  • Tweaks: Just about everything! We did a lot of refactoring in this release to make things silky smooth and über-maintainable.

1.3.5 – 2019-08-18

  • New: Block Lab will now enqueue a global stylesheet, so you can keep your common block styles in one place. Read more
  • New: Block templates can now be placed inside a sub-folder, for an even cleaner directory structure. Read more
  • Tweak: Use a textarea for specifying the default value of a textarea control.
  • Tweak: Better handling of deprecated functions.
  • Tweak: Rewrite of various functions, making developer access to common commands much simpler.
  • Fix: Child theme templates are now correctly loaded before their parent templates.
  • Fix: Autoslugs now continue to work properly after the title field loses focus.

1.3.4 – 2019-07-22

  • New: Block Lab grew to level 1.3.4. Block Lab learned Custom Categories.
  • Tweak: @phpbits used Pull Request. All right! The block_lab_get_block_attributes filter was caught!
  • Tweak: Template Loader used Harden. Template Loader‘s defense rose!
  • Tweak: Booted up a TM! It contained Unit Tests!
  • Fix: Wild Missing Filter in Inspector Controls bug appeared! Go! Bugfix!
  • Fix: Enemy Mixed Up Inspector Controls fainted! @kienstra gained 0902a06 EXP. Points!

1.3.3 – 2019-06-21

  • Fix: The previous release broke the className field, used for the Additional CSS Class setting. This fixes it.

1.3.2 – 2019-06-21

  • New: Rich Text Control (for Block Lab Pro users)!
  • New: Show Block Category in the list table
  • New: We’ve got a new block_lab_render_template hook which fires before rendering a block on the front end. Great for enqueuing JS
  • Tweak: Updated logo
  • Tweak: Prevent block field slugs from changing when you edit the field title
  • Fix: Saving your license key no longer results in an error page
  • Fix: License details screen showing the wrong information
  • Fix: Remove duplicate IDs on the edit block screen
  • Fix: Range sliders can now set a minimum value of zero
  • Fix: A console warning about unique props

1.3.1 – 2019-05-22

  • New: Support for Gutenberg’s built-in Additional CSS Class in your block template, by using the field className. Read more
  • New: The Textarea field now has an option to automatically add paragraph tags and line-breaks
  • Fix: Bug affecting blocks containing Pro fields when there’s no active Pro license

1.3.0 – 2019-04-30

Important: This update includes a backwards compatibility break related to the User field.

Read more here

  • New: A Taxonomy control type, for selecting a Category / Tag / or custom term from a dropdown menu (for Block Lab Pro users)
  • Fix: Bug with the Post control when outputting data with block_field()
  • Tweak: Update the User control to store data as an object, matching the Post control

1.2.3 – 2019-04-23

Important: This update includes a backwards compatibility break related to the Image field.
If you are using the block_value() function with an image field and externally hosted images, this update may effect you.

Read more here

  • New: A Post control type, for selecting a Post from a dropdown menu (for Block Lab Pro users)
  • New: Added the block_lab_controls filter to allow custom controls to be loaded (props @rohan2388)
  • New: The Image control now returns the image’s Post ID
  • Tweak: Travis CI support

1.2.2 – 2019-04-05

  • New: Block Editor redesign

1.2.1 – 2019-03-21

  • New: Automatic stylesheet enqueuing. Now you can create custom stylesheets for individual blocks! Read more here.
  • Nuevo: un tipo de control de usuario (para usuarios de Block Lab Pro)
  • Solución: varias correcciones de errores de selección múltiple que permiten valores vacíos en el control de selección múltiple

1.2.0 – 2019-02-27

  • Nuevo: Presentamos Block Lab Pro!
  • Nuevo: una configuración para el número de filas que se mostrarán en un control Textarea
  • Arreglo: Permitir números negativos en los controles de Número y Rango

1.1.3 – 2019-01-25

  • Nuevo: campo de imagen

1.1.2 – 2019-01-11

  • Nuevo: Campo de Color
  • Arreglo: Salida incorrecta para campos vacíos

1.1.1 – 2018-12-14

  • Solución: error de índice no definido para campos de selección múltiple y selección
  • Solución: los valores correctos ahora se devuelven para campos booleanos, como la casilla de verificación y la opción
  • Solución: ¡Las plantillas de vista previa del editor están de vuelta! Utilice el nombre del archivo preview-{blog slug}.php
  • Solución: “Las instrucciones de campo” ahora son un texto de una sola línea y su nombre cambia a “Texto de ayuda”
  • Arreglo: Se están agregando barras a las opciones de campo
  • Arreglo: Permitir un valor vacío para los campos de selección y número
  • Arreglo: Permitir valores por defecto vacíos

1.1.0 – 2018-12-07

  • Nuevo: Renovación completa de la vista previa en el editor
  • Nuevo: campo de correo electrónico
  • Nuevo: campo URL
  • Nuevo: Campo de número
  • Nuevo: funciones de ayuda block_config () y block_field_config , para recuperar la configuración de su bloque
  • Arreglo: errores de tiempo de archivo
  • Solución: las etiquetas HTML se estaban fusionando al previsualizarlas en el editor
  • Solución: problemas con comillas y guiones en el título de un bloque o parámetros de campo
  • Corrección: field_value() a veces devolvió el valor incorrecto
  • Solución: los valores incorrectos se muestran en la vista previa del editor

1.0.1 – 2018-11-16

  • Nuevo: Se agregó el botón “Guardar borrador”, para que pueda guardar Bloques en curso
  • Nuevo: Mejor manejo de la función de auto-slug, para que no cambies accidentalmente el slug de tu bloque.
  • Nuevo: Mejor expansión / contratación de los ajustes de campo.
  • Nuevo: soporte de Emoji (y carácter especial)! 😎
  • Solución: se resolvió el error fatal que podría ocurrir en algunos entornos.
  • Arreglo: Eliminar el campo “Descripción” no utilizado
  • Solución: Eliminar el icono de estrella duplicada

1.0.0 – 2018-11-14

Renombrar!
* Advanced Custom Blocks ahora es Block Lab

Agregado
* Nuevos tipos de control (Radio, casilla de verificación, Alternar, Seleccionar, Rango))
* Bloquear iconos
* Ubicación del campo: agregue sus campos de bloqueo al inspector
* Lista de refinamientos de tabla
* Mejoras en la tabla de repetidores de campo.

Corregido
* Todas las cosas. Probablemente no todas las cosas, pero cerca.

0.1.2 – 2018-08-10

Agregado
* Nuevas propiedades help, predeterminado y obligatorio agregadas a los campos.
* Posibilidad de importar bloques desde un archivo {theme}/blocks/blocks.json.
   Documentación aún por agregar.
* Gutenberg controla la biblioteca actualizada preparándose para 0.0.3 .

Cambios técnicos
* Arquitectura de control actualizada para mejorar el desarrollo
   y añadiendo añadiendo controles adicionales.
* Limpiar encolado de scripts.

0.1 – 2018-08-03

  • Versión inicial.