From 4605edb505c8f7fa8141a84d6b2fc91ce82f1e25 Mon Sep 17 00:00:00 2001 From: Guilherme Capanema Date: Thu, 16 Jul 2020 15:30:42 -0300 Subject: [PATCH] =?UTF-8?q?Permite=20m=C3=BAltiplos=20arquivos=20e=20custo?= =?UTF-8?q?miza=C3=A7=C3=A3o=20dos=20bot=C3=B5es=20dos=20materiais.=20Vers?= =?UTF-8?q?=C3=A3o=202.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/class-reuna-blocos-admin.php | 12 +++++-- admin/views/material.php | 56 ++++++++++-------------------- composer.json | 2 +- reuna-blocos.php | 4 +-- 4 files changed, 32 insertions(+), 42 deletions(-) diff --git a/admin/class-reuna-blocos-admin.php b/admin/class-reuna-blocos-admin.php index 9deb8a7..f2cafc3 100644 --- a/admin/class-reuna-blocos-admin.php +++ b/admin/class-reuna-blocos-admin.php @@ -3,6 +3,8 @@ use WordPlate\Acf\Fields\ColorPicker; use WordPlate\Acf\Fields\File; use WordPlate\Acf\Fields\Image; +use WordPlate\Acf\Fields\Repeater; +use WordPlate\Acf\Fields\Text; use WordPlate\Acf\Location; /** @@ -119,8 +121,14 @@ class Reuna_Blocos_Admin { 'fields' => [ Image::make('Capa')->returnFormat('id'), - File::make('Arquivo (online)'), - File::make('Arquivo (impressão)'), + + Repeater::make('Arquivos')->fields([ + File::make('Arquivo'), + Text::make('Botão'), + ]) + ->layout('block') + ->buttonLabel('Adicionar arquivo'), + ColorPicker::make('Cor')->defaultValue('#F15A31'), ], diff --git a/admin/views/material.php b/admin/views/material.php index c219fe3..770c74a 100644 --- a/admin/views/material.php +++ b/admin/views/material.php @@ -26,44 +26,26 @@ ?>
- - - href="" - target="_blank" - - @click="$dispatch('reuna-mailchimp-subscribe', { tags: [''] })" + + + + href="" + target="_blank" + + @click="$dispatch('reuna-mailchimp-subscribe', { tags: [''] })" + + + href="#" + @click.prevent="$dispatch('modal-open', { modal: 'login' })" - - href="#" - @click.prevent="$dispatch('modal-open', { modal: 'login' })" - - > - - - - - - - href="" - target="_blank" - - @click="$dispatch('reuna-mailchimp-subscribe', { tags: [''] })" - - - href="#" - @click.prevent="$dispatch('modal-open', { modal: 'login' })" - - > - - + > + + +
diff --git a/composer.json b/composer.json index 86800ac..be33eb7 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "2.1-dev" } }, "minimum-stability": "dev", diff --git a/reuna-blocos.php b/reuna-blocos.php index e7770df..c1f3830 100644 --- a/reuna-blocos.php +++ b/reuna-blocos.php @@ -16,7 +16,7 @@ * Plugin Name: Instituto Reúna - Blocos do editor * Plugin URI: https://horizontes.info * Description: Blocos do Gutenberg usados no site do Reúna - * Version: 1.6.0 + * Version: 2.0.0 * Author: Horizontes Coop. * Author URI: https://horizontes.info * License: GPL-2.0+ @@ -33,7 +33,7 @@ if ( ! defined( 'WPINC' ) ) { /** * Currently plugin version. */ -define( 'REUNA_BLOCOS_VERSION', '1.6.0' ); +define( 'REUNA_BLOCOS_VERSION', '2.0.0' ); /** * Require the Composer autoloader