From d5fee8cad1bbe608531c1ff1093f2e072d582e7b Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 26 Jun 2024 13:15:00 +0200 Subject: [PATCH] v 3.1.1 Toolbox v 0.14.1 : - Forms can be generated without FORM tag to wrap. --- inc/WPUBaseToolbox/WPUBaseToolbox.php | 17 +++++++++++------ wpubaseplugin.php | 6 +++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/inc/WPUBaseToolbox/WPUBaseToolbox.php b/inc/WPUBaseToolbox/WPUBaseToolbox.php index d32d433..415d364 100644 --- a/inc/WPUBaseToolbox/WPUBaseToolbox.php +++ b/inc/WPUBaseToolbox/WPUBaseToolbox.php @@ -1,10 +1,10 @@ true @@ -72,7 +72,9 @@ public function get_form_html($form_id, $fields = array(), $args = array()) { $button_submit = ''; /* Start form */ - $html .= '
'; + if ($args['form_element']) { + $html .= ''; + } $html .= $args['html_before_content']; $html_fieldset = ''; @@ -149,9 +151,11 @@ public function get_form_html($form_id, $fields = array(), $args = array()) { $html .= ''; $html .= $args['html_after_content']; - /* End form */ - $html .= '
'; + /* End form */ + if ($args['form_element']) { + $html .= ''; + } return $html; } @@ -172,6 +176,7 @@ public function get_clean_form_args($form_id, $fields = array(), $args = array() ), 'form_attributes' => '', 'form_classname' => 'cssc-form', + 'form_element' => true, 'field_group_classname' => 'twoboxes', 'field_box_classname' => 'box', 'submit_box_classname' => 'box--submit', diff --git a/wpubaseplugin.php b/wpubaseplugin.php index 24bcba0..e3b8703 100644 --- a/wpubaseplugin.php +++ b/wpubaseplugin.php @@ -5,7 +5,7 @@ Plugin URI: https://github.com/WordPressUtilities/wpubaseplugin Update URI: https://github.com/WordPressUtilities/wpubaseplugin Description: A framework for a WordPress plugin -Version: 3.1.0 +Version: 3.1.1 Author: Darklg Author URI: https://darklg.me/ Text Domain: wpubaseplugin @@ -20,7 +20,7 @@ class WPUBasePlugin { - public $version = '3.1.0'; + public $version = '3.1.1'; private $utilities_classes = array( 'messages' => array( @@ -56,7 +56,7 @@ class WPUBasePlugin { 'name' => 'WPUBaseEmail' ), 'toolbox' => array( - 'namespace' => 'wpubasetoolbox_0_14_0', + 'namespace' => 'wpubasetoolbox_0_14_1', 'name' => 'WPUBaseToolbox' ), 'filecache' => array(