From 96730a95f691d2b450dc0550091f3b525e5e8723 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 3 Aug 2023 17:34:45 +0100 Subject: [PATCH] v 2.53.1 Base Fields v 0.16.1 - Handle display base on two fields. --- inc/WPUBaseFields/WPUBaseFields.php | 6 ++--- inc/WPUBaseFields/assets/admin.js | 38 +++++++++++++++-------------- wpubaseplugin.php | 20 ++++++++++++--- 3 files changed, 40 insertions(+), 24 deletions(-) diff --git a/inc/WPUBaseFields/WPUBaseFields.php b/inc/WPUBaseFields/WPUBaseFields.php index d0ddf1f..0de805d 100644 --- a/inc/WPUBaseFields/WPUBaseFields.php +++ b/inc/WPUBaseFields/WPUBaseFields.php @@ -1,10 +1,10 @@ array( @@ -42,7 +42,7 @@ class WPUBasePlugin { 'name' => 'WPUBaseCron' ), 'fields' => array( - 'namespace' => 'wpubasefields_0_16_0', + 'namespace' => 'wpubasefields_0_16_1', 'name' => 'WPUBaseFields' ), 'update' => array( @@ -277,6 +277,20 @@ public function init() { 'label' => 'Demo checkbox', 'type' => 'checkbox' ), + 'demo_checkbox2' => array( + 'group' => 'group_1', + 'label' => 'Demo checkbox', + 'type' => 'checkbox' + ), + 'demo_checkbox_text' => array( + 'group' => 'group_1', + 'toggle-display' => array( + 'demo_checkbox2' => 'checked', + 'demo_checkbox' => 'checked' + ), + 'label' => 'Demo checkbox text', + 'type' => 'text' + ), 'demo2' => array( 'group' => 'group_2', 'label' => 'Demo 2'