Skip to content

Commit 65fb225

Browse files
committed
version 2.0.4 released
1 parent a9a4952 commit 65fb225

File tree

9 files changed

+95
-55
lines changed

9 files changed

+95
-55
lines changed

README.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: codeboxr, manchumahara
33
Tags: changelog,history,release,version,product log
44
Requires at least: 5.3
55
Tested up to: 6.7.2
6-
Stable tag: 2.0.3
6+
Stable tag: 2.0.4
77
Requires PHP: 7.4
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -74,6 +74,11 @@ This helps to write changes log for any digital products, projects releases. Any
7474

7575

7676
== Changelog ==
77+
= 2.0.4 =
78+
* [updated] Support page news display updated
79+
* [updated] Pro Addon V1.2.0 released
80+
* [updated] Misc improvements
81+
7782
= 2.0.3 =
7883
* [updated] WordPress core 6.7.2 compatibility checked
7984
* [updated] Pro Addon V1.1.9 released

assets/css/cbxchangelog-admin.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/cbxchangelog-listing.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cbxchangelog.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Plugin Name: CBX Changelog
1111
* Plugin URI: http://codeboxr.com/product/cbx-changelog-for-wordpress/
1212
* Description: Easy change log manager for WordPress, use for any product post type or releases notes
13-
* Version: 2.0.3
13+
* Version: 2.0.4
1414
* Author: Codeboxr
1515
* Author URI: http://codeboxr.com
1616
* License: GPL-2.0+
@@ -26,7 +26,7 @@
2626

2727

2828
defined( 'CBXCHANGELOG_PLUGIN_NAME' ) or define( 'CBXCHANGELOG_PLUGIN_NAME', 'cbxchangelog' );
29-
defined( 'CBXCHANGELOG_PLUGIN_VERSION' ) or define( 'CBXCHANGELOG_PLUGIN_VERSION', '2.0.3' );
29+
defined( 'CBXCHANGELOG_PLUGIN_VERSION' ) or define( 'CBXCHANGELOG_PLUGIN_VERSION', '2.0.4' );
3030
defined( 'CBXCHANGELOG_ROOT_PATH' ) or define( 'CBXCHANGELOG_ROOT_PATH', plugin_dir_path( __FILE__ ) );
3131
defined( 'CBXCHANGELOG_ROOT_URL' ) or define( 'CBXCHANGELOG_ROOT_URL', plugin_dir_url( __FILE__ ) );
3232
defined( 'CBXCHANGELOG_BASE_NAME' ) or define( 'CBXCHANGELOG_BASE_NAME', plugin_basename( __FILE__ ) );

includes/CBXChangelog.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ private function load_dependencies() {
154154
* @access private
155155
*/
156156
private function define_common_hooks() {
157-
add_action( 'plugins_loaded', [ $this, 'load_plugin_textdomain' ] );
157+
//add_action( 'plugins_loaded', [ $this, 'load_plugin_textdomain' ] );
158+
add_action( 'init', [ $this, 'load_plugin_textdomain' ] );
158159
}//end method define_common_hooks
159160

160161
/**

includes/CBXChangelogAdmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ public function custom_message_after_plugin_row_proaddon( $plugin_file, $plugin_
980980
}
981981

982982
$pro_addon_version = CBXChangelogHelper::get_any_plugin_version( 'cbxchangelogpro/cbxchangelogpro.php' );
983-
$pro_latest_version = '1.1.9';
983+
$pro_latest_version = '1.2.0';
984984

985985

986986
if ( $pro_addon_version != '' && version_compare( $pro_addon_version, $pro_latest_version, '<' ) ) {

includes/CBXChangelogHelper.php

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,5 +796,50 @@ public static function block_editor_true_meta_empty( $value ) {
796796
];
797797

798798
return isset( $arr[ $value ] ) ? $arr[ $value ] : '';
799-
}
799+
}//end method block_editor_true_meta_empty
800+
801+
/**
802+
* Returns codeboxr news feeds using transient cache
803+
*
804+
* @return false|mixed|\SimplePie\Item[]|null
805+
*/
806+
public static function codeboxr_news_feed() {
807+
$cache_key = 'codeboxr_news_feed_cache';
808+
$cached_feed = get_transient( $cache_key );
809+
810+
$news = false;
811+
812+
if ( false === $cached_feed ) {
813+
include_once ABSPATH . WPINC . '/feed.php'; // Ensure feed functions are available
814+
$feed = fetch_feed( 'https://codeboxr.com/feed?post_type=post' );
815+
816+
if ( is_wp_error( $feed ) ) {
817+
return false; // Return false if there's an error
818+
}
819+
820+
$feed->init();
821+
822+
$feed->set_output_encoding( 'UTF-8' ); // this is the encoding parameter, and can be left unchanged in almost every case
823+
$feed->handle_content_type(); // this double-checks the encoding type
824+
$feed->set_cache_duration( 21600 ); // 21,600 seconds is six hours
825+
$limit = $feed->get_item_quantity( 10 ); // fetches the 18 most recent RSS feed stories
826+
$items = $feed->get_items( 0, $limit );
827+
$blocks = array_slice( $items, 0, 10 );
828+
829+
$news = [];
830+
foreach ( $blocks as $block ) {
831+
$url = $block->get_permalink();
832+
$url = CBXChangelogHelper::url_utmy( esc_url( $url ) );
833+
$title = $block->get_title();
834+
835+
$news[] = ['url' => $url, 'title' => $title];
836+
}
837+
838+
set_transient( $cache_key, $news, HOUR_IN_SECONDS * 6 ); // Cache for 6 hours
839+
} else {
840+
$news = $cached_feed;
841+
}
842+
843+
return $news;
844+
}//end method codeboxr_news_feed
800845
}//end method CBXChangelogHelper

templates/admin/support.php

Lines changed: 34 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@
100100
</div>
101101
</div>
102102
<div class="content">
103+
<div class="cbx-backend-settings-row">
104+
<p>Version - 2.0.4</p>
105+
<ul>
106+
<li>[updated] Support page news display updated</li>
107+
<li[updated] Pro Addon V1.2.0 released</li>
108+
<li>[updated] Misc improvements</li>
109+
</ul>
110+
</div>
103111
<div class="cbx-backend-settings-row">
104112
<p>Version - 2.0.3</p>
105113
<ul>
@@ -118,15 +126,6 @@
118126
<li> [new] Show single changelog items/features by group (Show Added, Fixed etc as grouped)</li>
119127
</ul>
120128
</div>
121-
<div class="cbx-backend-settings-row">
122-
<p>Version - 2.0.0</p>
123-
<ul>
124-
<li> [fixed] Fixed saving only single changelog from dashboard edit screen</li>
125-
<li> [new] Added new feature to resync release no/id with dashboard edit screen display index(from top to bottom)</li>
126-
<li> [new] Added new feature to resync release no/id with dashboard edit screen display index(bottom top to top)</li>
127-
<li> [new] Added new feature to delete all releases with one single click from the dashboard edit screen</li>
128-
</ul>
129-
</div>
130129
</div>
131130
</div>
132131
<div class="cbx-backend-card dashboard-changelog">
@@ -137,6 +136,14 @@
137136
</div>
138137
<div class="content">
139138
<div class="cbx-backend-settings-row">
139+
<div class="cbx-backend-settings-row">
140+
<p>Version - 1.2.0</p>
141+
<ul>
142+
<li>[updated] Plugin loader, main classes updated</li>
143+
<li>[updated] Core plugin updated to V2.0.4</li>
144+
<li>[updated] Misc improvements</li>
145+
</ul>
146+
</div>
140147
<div class="cbx-backend-settings-row">
141148
<p>Version - 1.1.9</p>
142149
<ul>
@@ -155,12 +162,6 @@
155162
<li>[updated] CBX Changelog core plugin V1.1.6 compatible</li>
156163
</ul>
157164
</div>
158-
<div class="cbx-backend-settings-row">
159-
<p>Version - 1.1.5</p>
160-
<ul>
161-
<li>[fixed] hugo style fixed<li>
162-
</ul>
163-
</div>
164165
</div>
165166
</div>
166167
</div>
@@ -266,40 +267,28 @@
266267
</div>
267268
</div>
268269
<div class="content">
269-
<?php
270+
<?php
271+
$items = CBXChangelogHelper::codeboxr_news_feed();
272+
if ( $items !== false && count( $items ) > 0 ) {
273+
foreach ( $items as $item ) {
274+
$url = $item['url'];
275+
$title = $item['title'];
270276

271-
include_once( ABSPATH . WPINC . '/feed.php' );
272-
if ( function_exists( 'fetch_feed' ) ) {
273-
//$feed = fetch_feed( 'https://codeboxr.com/feed?post_type=product' );
274-
$feed = fetch_feed( 'https://codeboxr.com/feed?post_type=post' );
275-
if ( ! is_wp_error( $feed ) ) : $feed->init();
276-
$feed->set_output_encoding( 'UTF-8' ); // this is the encoding parameter, and can be left unchanged in almost every case
277-
$feed->handle_content_type(); // this double-checks the encoding type
278-
$feed->set_cache_duration( 21600 ); // 21,600 seconds is six hours
279-
$limit = $feed->get_item_quantity( 10 ); // fetches the 18 most recent RSS feed stories
280-
$items = $feed->get_items( 0, $limit ); // this sets the limit and array for parsing the feed
281-
282-
$blocks = array_slice( $items, 0, 10 );
283-
284-
//echo '<ul>';
285-
286-
foreach ( $blocks as $block ) {
287-
$url = $block->get_permalink();
288-
$url = CBXChangelogHelper::url_utmy( $url ); ?>
289-
<div class="cbx-backend-settings-row">
290-
<a href="<?php echo esc_url($url); ?>" target="_blank">
291-
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
277+
echo '<div class="cbx-backend-settings-row">';
278+
echo '<a href="' . esc_url( $url ) . '" target="_blank">';
279+
echo '<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
292280
<defs/>
293281
<path d="M16.4 9.1L12.2 5c-.3-.3-.7-.3-1-.2s-.6.5-.6.9v1.7H4.2c-.5 0-.9.4-.9.9v3.4c0 .2.1.5.3.7.2.2.4.3.7.3h6.4v1.7c0 .4.2.7.6.9.4.1.8.1 1-.2l4.1-4.2c.4-.5.4-1.3 0-1.8z"
294282
fill="currentColor"/>
295-
</svg>
296-
<?php echo esc_html($block->get_title()); ?></a>
297-
</div>
298-
<?php
299-
}//end foreach
300-
endif;
301-
}
302-
?>
283+
</svg>';
284+
285+
//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
286+
echo $title;
287+
echo '</a>';
288+
echo '</div>';
289+
}//end for loop
290+
}//if data found
291+
?>
303292
</div>
304293
</div>
305294
</div>

vendor/composer/installed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => '__root__',
44
'pretty_version' => 'dev-master',
55
'version' => 'dev-master',
6-
'reference' => '7760c0ed015d0cc82b16e391e060b7c38a37e2e1',
6+
'reference' => '8b40f8442bad251303c5547e5f5e505860ef86d9',
77
'type' => 'library',
88
'install_path' => __DIR__ . '/../../',
99
'aliases' => array(),
@@ -13,7 +13,7 @@
1313
'__root__' => array(
1414
'pretty_version' => 'dev-master',
1515
'version' => 'dev-master',
16-
'reference' => '7760c0ed015d0cc82b16e391e060b7c38a37e2e1',
16+
'reference' => '8b40f8442bad251303c5547e5f5e505860ef86d9',
1717
'type' => 'library',
1818
'install_path' => __DIR__ . '/../../',
1919
'aliases' => array(),

0 commit comments

Comments
 (0)