Skip to content

Commit

Permalink
[change] updated for version 2.0.12 (nightly)
Browse files Browse the repository at this point in the history
  • Loading branch information
ka215 committed Apr 28, 2016
1 parent 83dc4d7 commit 033f46f
Show file tree
Hide file tree
Showing 8 changed files with 590 additions and 107 deletions.
4 changes: 2 additions & 2 deletions cdbt.php
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Custom DataBase Tables
Plugin URI: https://ka2.org/
Description: <strong>C</strong>ustom <strong>D</strong>ata<strong>B</strong>ase <strong>T</strong>ables is unleash the potential force of WordPress as the strongest CMS. It will dominate the MySQL database of WordPress, to create a freely table, and can be turning data thoroughly tinker.
Version: 2.0.11
Version: 2.0.12
Author: ka2
Author URI: https://ka2.org/
Copyright: 2016 Monaural Sound (email : ka2@ka2.org)
Expand All @@ -30,7 +30,7 @@
*/
?>
<?php
define('CDBT_PLUGIN_VERSION', '2.0.11');
define('CDBT_PLUGIN_VERSION', '2.0.12');
define('CDBT_DB_VERSION', '2.1');
define('CDBT', 'custom-database-tables'); // This plugin domain name

Expand Down
2 changes: 1 addition & 1 deletion lib/extras.php
Expand Up @@ -283,7 +283,7 @@ public function create_scheme_datasource( $conponent_id='cdbtRepeater', $page_in
"item.attr('class', 'cdbt-repeater-row');"
];
// For after rendered
$repeater_custom_methods['afterRender'] = "function(){ console.info('rendered'); }";
$repeater_custom_methods['afterRender'] = "";

$columns = [
[ 'label' => __('CSID', CDBT),
Expand Down
17 changes: 12 additions & 5 deletions lib/shortcodes.php
Expand Up @@ -1221,11 +1221,15 @@ public function editable_data_list() {
}

$all_columns = array_keys($table_schema);
if ($exclude_cols = $this->strtoarray($exclude_cols)) {
if ( $exclude_cols = $this->strtoarray( $exclude_cols ) ) {
$output_columns = [];
foreach ($all_columns as $_col) {
if (!in_array($_col, $exclude_cols))
foreach ( $all_columns as $_col ) {
if ( $has_pk && in_array( $_col, $pk_columns ) ) {
$output_columns[] = $_col;
} else
if ( ! in_array( $_col, $exclude_cols ) ) {
$output_columns[] = $_col;
}
}
}
if (!isset($output_columns))
Expand Down Expand Up @@ -1421,10 +1425,13 @@ public function editable_data_list() {
$columns = [];
foreach ($table_schema as $column => $scheme) {
$_classes = [];
if (!in_array($column, $output_columns))
if ( ! in_array( $column, $output_columns ) )
$_classes[] = 'hide';
if (!$enable_sort)
if ( isset( $exclude_cols ) && is_array( $exclude_cols ) && in_array( $column, $exclude_cols ) )
$_classes[] = 'hide';
if ( ! $enable_sort )
$_classes[] = 'disable-sort';

$columns[] = [
'label' => empty($scheme['logical_name']) ? $column : $scheme['logical_name'],
'property' => $column,
Expand Down
11 changes: 9 additions & 2 deletions readme.txt
Expand Up @@ -3,8 +3,8 @@ Contributors: ka2
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=2YZY4HWYSWEWG&lc=en_US&currency_code=USD&item_name=
Tags: custom database tables, MySQL, database, table, create, delete, select, insert, update, truncate, drop, alter table, import, export, CSV
Requires at least: 4.0
Tested up to: 4.4.2
Stable tag: 2.0.11
Tested up to: 4.5.1
Stable tag: 2.0.12
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -68,6 +68,13 @@ There is no particular restriction on the amount of data that is stored in a tab

== Changelog ==

= 2.0.12 =
* Fixed a bug in when converting the datetime format of the data outputted.
* Adjusted the behavior of the data sorting of repeater components that are output in "cdbt-view" and "cdbt-edit".
* Fixed a bug that did not retrieve data in the specified row on the popped out editing form if had hidden the column of primary key at the "cdbt-edit".
* Fixed a bug that session continuation of the specified table in the table management was unstable.
* Corresponded for WordPress 4.5.x.

= 2.0.11 =
* Added the "cdbt_admin_truncate_strings" filter for the number of character truncation for the table management.
* Added new option for changing the label name of registration button on the "cdbt-entry".
Expand Down

0 comments on commit 033f46f

Please sign in to comment.