Skip to content

Commit

Permalink
version 1.1.10 released
Browse files Browse the repository at this point in the history
  • Loading branch information
manchumahara committed Jan 14, 2025
1 parent 58e9edf commit b550a93
Show file tree
Hide file tree
Showing 6 changed files with 310 additions and 384 deletions.
5 changes: 4 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: codeboxr, manchumahara
Tags: changelog,history,release,version,product log
Requires at least: 5.3
Tested up to: 6.7.1
Stable tag: 1.1.9
Stable tag: 1.1.10
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -73,6 +73,9 @@ This helps to write changes log for any digital products, projects releases. Any


== Changelog ==
= 1.1.10 =
* [fixed] Changelog added at top from edit screen save error fixed! [Sorry for the inconvenience]

= 1.1.9 =
* [new] Added new shortcode param 'count' , 0 means all, any value more than 0 show as specific number of changelogs
* [new] Dashboard changelog edit screenshot has two buttons for adding change log 1. Add changelog at bottom, 2. Add changelog at top
Expand Down
4 changes: 2 additions & 2 deletions cbxchangelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Plugin Name: CBX Changelog
* Plugin URI: http://codeboxr.com/product/cbx-changelog-for-wordpress/
* Description: Easy change log manager for WordPress, use for any product post type or releases notes
* Version: 1.1.9
* Version: 1.1.10
* Author: Codeboxr
* Author URI: http://codeboxr.com
* License: GPL-2.0+
Expand All @@ -32,7 +32,7 @@


defined( 'CBXCHANGELOG_PLUGIN_NAME' ) or define( 'CBXCHANGELOG_PLUGIN_NAME', 'cbxchangelog' );
defined( 'CBXCHANGELOG_PLUGIN_VERSION' ) or define( 'CBXCHANGELOG_PLUGIN_VERSION', '1.1.9' );
defined( 'CBXCHANGELOG_PLUGIN_VERSION' ) or define( 'CBXCHANGELOG_PLUGIN_VERSION', '1.1.10' );
defined( 'CBXCHANGELOG_ROOT_PATH' ) or define( 'CBXCHANGELOG_ROOT_PATH', plugin_dir_path( __FILE__ ) );
defined( 'CBXCHANGELOG_ROOT_URL' ) or define( 'CBXCHANGELOG_ROOT_URL', plugin_dir_url( __FILE__ ) );
defined( 'CBXCHANGELOG_BASE_NAME' ) or define( 'CBXCHANGELOG_BASE_NAME', plugin_basename( __FILE__ ) );
Expand Down
14 changes: 10 additions & 4 deletions includes/CBXChangelogAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,18 @@ public function metabox_save( $post_id, $post, $update ) {
$submitted_values = isset( $_POST['cbxchangelog_logs'] ) ? wp_unslash( $_POST['cbxchangelog_logs'] ) : []; //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized

$meta_data = CBXChangelogHelper::get_changelog_data( $post_id );
$meta_data->reindexUsedKeys();//let's confirm the usedKeys are not messed or rearranged
$used_keys = $meta_data->getUsedKeys();
$nextIndex = max($used_keys) + 1;



//let's reset as we need to honor the index order to display
$meta_data->resetRows();
$meta_data->settNextIndex($nextIndex);




foreach ( $submitted_values as $value ) {
$valid_change_log = [];
Expand Down Expand Up @@ -384,13 +393,10 @@ public function metabox_save( $post_id, $post, $update ) {
}*/


if ( $id > 0 ) {
$valid_change_log['id'] = $id;
}

$valid_change_log['id'] = $id == 0 ? $meta_data->getNextIndex() : $id;
$meta_data->insert( $valid_change_log );


unset( $valid_change_log );
//$valid_change_logs[] = $valid_change_log;
}//end for each
Expand Down
Loading

0 comments on commit b550a93

Please sign in to comment.