Skip to content

Commit

Permalink
v 3.1.1
Browse files Browse the repository at this point in the history
Toolbox v 0.14.1 :
- Forms can be generated without FORM tag to wrap.
  • Loading branch information
Darklg committed Jun 26, 2024
1 parent b713fad commit d5fee8c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
17 changes: 11 additions & 6 deletions inc/WPUBaseToolbox/WPUBaseToolbox.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
namespace wpubasetoolbox_0_14_0;
namespace wpubasetoolbox_0_14_1;

/*
Class Name: WPU Base Toolbox
Description: Cool helpers for WordPress Plugins
Version: 0.14.0
Version: 0.14.1
Class URI: https://github.com/WordPressUtilities/wpubaseplugin
Author: Darklg
Author URI: https://darklg.me/
Expand All @@ -15,7 +15,7 @@
defined('ABSPATH') || die;

class WPUBaseToolbox {
private $plugin_version = '0.14.0';
private $plugin_version = '0.14.1';
private $args = array();
private $default_module_args = array(
'need_form_js' => true
Expand Down Expand Up @@ -72,7 +72,9 @@ public function get_form_html($form_id, $fields = array(), $args = array()) {
$button_submit = '<button class="' . esc_attr($args['button_classname']) . '" type="submit"><span>' . $args['button_label'] . '</span></button>';

/* Start form */
$html .= '<form class="' . esc_attr($args['form_classname']) . ' wpubasetoolbox-form" id="' . esc_attr($form_id) . '" ' . ($args['wizard_mode'] ? ' data-wizard="1"' : '') . ' action="" method="post" ' . $extra_post_attributes . '>';
if ($args['form_element']) {
$html .= '<form class="' . esc_attr($args['form_classname']) . ' wpubasetoolbox-form" id="' . esc_attr($form_id) . '" ' . ($args['wizard_mode'] ? ' data-wizard="1"' : '') . ' action="" method="post" ' . $extra_post_attributes . '>';
}
$html .= $args['html_before_content'];

$html_fieldset = '';
Expand Down Expand Up @@ -149,9 +151,11 @@ public function get_form_html($form_id, $fields = array(), $args = array()) {
$html .= '</div>';

$html .= $args['html_after_content'];
/* End form */
$html .= '</form>';

/* End form */
if ($args['form_element']) {
$html .= '</form>';
}
return $html;
}

Expand All @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions wpubaseplugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,7 +20,7 @@

class WPUBasePlugin {

public $version = '3.1.0';
public $version = '3.1.1';

private $utilities_classes = array(
'messages' => array(
Expand Down Expand Up @@ -56,7 +56,7 @@ class WPUBasePlugin {
'name' => 'WPUBaseEmail'
),
'toolbox' => array(
'namespace' => 'wpubasetoolbox_0_14_0',
'namespace' => 'wpubasetoolbox_0_14_1',
'name' => 'WPUBaseToolbox'
),
'filecache' => array(
Expand Down

0 comments on commit d5fee8c

Please sign in to comment.