diff --git a/inc/WPUBaseSettings/README.md b/inc/WPUBaseSettings/README.md index 8455377..2103da3 100644 --- a/inc/WPUBaseSettings/README.md +++ b/inc/WPUBaseSettings/README.md @@ -36,6 +36,7 @@ if (is_admin()) { ## Insert in your admin page content ( if needed ) ```php +settings_errors(); echo '
'; settings_fields($this->settings_details['option_id']); do_settings_sections($this->options['plugin_id']); diff --git a/inc/WPUBaseToolbox/WPUBaseToolbox.php b/inc/WPUBaseToolbox/WPUBaseToolbox.php index c581aff..a12ed3f 100644 --- a/inc/WPUBaseToolbox/WPUBaseToolbox.php +++ b/inc/WPUBaseToolbox/WPUBaseToolbox.php @@ -1,10 +1,10 @@ 'widefat', + 'colnames' => array() + ); + if (!is_array($args)) { + $args = array(); + } + $args = array_merge($default_args, $args); + + $html = ''; + + /* HEAD */ + $html .= ''; + foreach ($array[0] as $key => $value) { + $label = $key; + if (isset($args['colnames'][$key])) { + $label = $args['colnames'][$key]; + } + $html .= '' . htmlspecialchars($label) . ''; + } + $html .= ''; + + /* CONTENT */ + $html .= ''; + foreach ($array as $line) { + $html .= ''; + foreach ($line as $value) { + $html .= '' . htmlspecialchars($value) . ''; + } + $html .= ''; + } + $html .= ''; + + /* Return content */ + $html = '' . $html . '
'; + return $html; + } + } diff --git a/wpubaseplugin.php b/wpubaseplugin.php index f46e879..c5cc632 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: 2.68.1 +Version: 2.69.0 Author: Darklg Author URI: https://darklg.me/ Text Domain: wpubaseplugin @@ -20,7 +20,7 @@ class WPUBasePlugin { - public $version = '2.68.1'; + public $version = '2.69.0'; private $utilities_classes = array( 'messages' => array( @@ -56,7 +56,7 @@ class WPUBasePlugin { 'name' => 'WPUBaseEmail' ), 'toolbox' => array( - 'namespace' => 'wpubasetoolbox_0_11_1', + 'namespace' => 'wpubasetoolbox_0_12_0', 'name' => 'WPUBaseToolbox' ), 'filecache' => array(