Skip to content

Commit 5481362

Browse files
committed
Update readme.txt: bump stable tag to 4.2.3, expand changelog with Pro features and security improvements
1 parent caf4e65 commit 5481362

16 files changed

Lines changed: 78 additions & 29 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ Contextual Related Posts is available for [translation directly on WordPress.org
132132

133133
## Screenshots
134134

135-
![General Options](https://raw.github.com/WebberZone/contextual-related-posts/master/wporg-assets/screenshot-1.png)
136-
_Contextual Related Posts - General Options_
135+
![Frontend View](https://raw.github.com/WebberZone/contextual-related-posts/master/wporg-assets/screenshot-1.png)
136+
_Contextual Related Posts - Frontend View_
137137

138138
More screenshots are available on the [WordPress plugin page](https://wordpress.org/plugins/contextual-related-posts/screenshots/)
139139

readme.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Tags: related posts, related, contextual related posts, similar posts, seo
33
Contributors: webberzone, ajay
44
Donate link: https://wzn.io/donate-crp
5-
Stable tag: 4.2.2
5+
Stable tag: 4.2.3
66
Requires at least: 6.6
77
Tested up to: 6.9
88
Requires PHP: 7.4
@@ -199,10 +199,20 @@ The plugin also handles SSL, resizing, and fallback mechanisms automatically for
199199
* (Pro) Added ACF field support for thumbnails: specify an Advanced Custom Fields Image or Text field name in the thumbnail settings. Supports all ACF Image field return formats (Image Array, Image ID, Image URL) as well as plain Text fields containing a URL.
200200

201201
* Modifications:
202+
* [Pro] Scheduled reconciliation cron: a twicedaily background job now automatically syncs any published posts that are missing from the custom search index table — keeps the index complete without manual intervention.
203+
* [Pro] Custom table upsert optimized to use `INSERT ... ON DUPLICATE KEY UPDATE`, reducing write contention on high-traffic sites.
204+
* [Pro] Database check results are now cached within a request, reducing redundant `SHOW TABLES` queries on pages that check table status multiple times.
205+
* [Pro] Tools page migration and undo scripts are now loaded as external JavaScript files (via `wp_enqueue_script`) instead of inline `<script>` blocks — improves compatibility with strict Content Security Policies.
206+
* [Pro] Copy-to-clipboard buttons on the tools and custom tables pages are now initialized automatically; no per-block inline script needed.
207+
* [Pro] The Include Categories Tom Select field in the post metabox is now correctly initialized.
208+
* [Pro] Network admin: settings copy URL cleanup and select-all checkbox logic moved to an external JavaScript file.
209+
* Tom Select fields in the settings now include a clear button for easier value removal.
210+
* Fixed spinner alignment inside action buttons (now displays inline rather than floating).
202211
* The custom CSS will now always be available in the frontend when the field contains CSS.
203212
* Manual Related Posts lookup improved.
204213

205214
* Fixes:
215+
* Security hardening: improved output escaping in settings forms and metabox fields.
206216
* Fixed Tom Select value extraction for multiselect fields which gave a JS error.
207217

208218
= 4.2.2 =
@@ -261,5 +271,4 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
261271
== Upgrade Notice ==
262272

263273
= 4.2.3 =
264-
Pro: Added ACF field support for thumbnails.
265-
Modifications: Improved Manual Related Posts lookup.
274+
Pro: Added ACF field support for thumbnails. Scheduled reconciliation cron for custom search index. Security hardening and multiple admin UI improvements.

vendor/freemius/assets/js/pricing/freemius-pricing.js

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

vendor/freemius/includes/class-freemius.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6558,10 +6558,7 @@ private function maybe_schedule_sync_cron() {
65586558
$next_schedule = $this->next_sync_cron();
65596559

65606560
// The event is properly scheduled, so no need to reschedule it.
6561-
if (
6562-
is_numeric( $next_schedule ) &&
6563-
$next_schedule > time()
6564-
) {
6561+
if ( is_numeric( $next_schedule ) ) {
65656562
return;
65666563
}
65676564

@@ -7098,7 +7095,6 @@ private function add_sticky_optin_admin_notice() {
70987095
*/
70997096
function _enqueue_connect_essentials() {
71007097
wp_enqueue_script( 'jquery' );
7101-
wp_enqueue_script( 'json2' );
71027098

71037099
fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.js' );
71047100
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
@@ -17436,7 +17432,7 @@ function setup_network_account(
1743617432
FS_User_Lock::instance()->unlock();
1743717433
}
1743817434

17439-
if ( 1 < count( $installs ) ) {
17435+
if ( 1 < count( $installs ) || fs_is_network_admin() ) {
1744017436
// Only network level opt-in can have more than one install.
1744117437
$is_network_level_opt_in = true;
1744217438
}

vendor/freemius/includes/class-fs-plugin-updater.php

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,32 @@ function pre_set_site_transient_update_plugins_filter( $transient_data ) {
540540
return $transient_data;
541541
}
542542

543+
// Alias.
544+
$basename = $this->_fs->premium_plugin_basename();
545+
543546
global $wp_current_filter;
544547

545-
if ( ! empty( $wp_current_filter ) && in_array( 'upgrader_process_complete', $wp_current_filter ) ) {
548+
/**
549+
* During bulk updates, avoid re-injecting update data for the plugin itself once it has already been updated.
550+
*
551+
* If the custom package is re-added to the transient after the plugin update, WordPress may detect the package again and incorrectly report "The plugin is at the latest version" for a pending update, since the custom package version matches the currently installed version.
552+
*
553+
* Behavior differs depending on how the bulk update is triggered. Please refer to the inline comments for each flow below for details.
554+
*/
555+
if (
556+
! empty( $wp_current_filter ) && (
557+
/**
558+
* update-core.php and other upgrader pages:
559+
* The `upgrader_process_complete` action fires only once after all updates have finished. In this case, it is the current action (`$wp_current_filter[0]`), while `self::$_upgrade_basename` may contain any plugin basename.
560+
*/
561+
'upgrader_process_complete' === $wp_current_filter[0] ||
562+
/**
563+
* AJAX bulk updates (e.g., from the Plugins page):
564+
* The `upgrader_process_complete` action fires multiple times — once for each plugin after it finishes updating. In this flow, it is not the current action (`$wp_current_filter[0]`) because it is triggered from another action. Instead, we compare `self::$_upgrade_basename` with the basename of the plugin currently being updated, since the `upgrader_process_complete` action runs separately for each plugin.
565+
*/
566+
( in_array( 'upgrader_process_complete', $wp_current_filter ) && self::$_upgrade_basename === $basename )
567+
)
568+
) {
546569
return $transient_data;
547570
}
548571

@@ -566,9 +589,6 @@ function pre_set_site_transient_update_plugins_filter( $transient_data ) {
566589
}
567590
}
568591

569-
// Alias.
570-
$basename = $this->_fs->premium_plugin_basename();
571-
572592
if ( is_object( $this->_update_details ) ) {
573593
if ( isset( $transient_data->no_update ) ) {
574594
unset( $transient_data->no_update[ $basename ] );

vendor/freemius/includes/fs-essential-functions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
1111
* @since 1.1.5
1212
*/
13+
if ( ! defined( 'ABSPATH' ) ) {
14+
exit;
15+
}
1316

1417
if ( ! function_exists( 'fs_normalize_path' ) ) {
1518
if ( function_exists( 'wp_normalize_path' ) ) {

vendor/freemius/includes/managers/class-fs-contact-form-manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function get_standalone_link( Freemius $fs ) {
7777
$query_params = $this->get_query_params( $fs );
7878

7979
$query_params['is_standalone'] = 'true';
80-
$query_params['parent_url'] = admin_url( add_query_arg( null, null ) );
80+
$query_params['parent_url'] = admin_url( add_query_arg( '', '' ) );
8181

8282
return WP_FS__ADDRESS . '/contact/?' . http_build_query( $query_params );
8383
}

vendor/freemius/includes/managers/class-fs-debug-manager.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
* @package Freemius
77
* @since 2.6.2
88
*/
9+
if ( ! defined( 'ABSPATH' ) ) {
10+
exit;
11+
}
912

1013
class FS_DebugManager {
1114

vendor/freemius/start.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* @var string
1717
*/
18-
$this_sdk_version = '2.13.0';
18+
$this_sdk_version = '2.13.1';
1919

2020
#region SDK Selection Logic --------------------------------------------------------------------
2121

vendor/freemius/templates/account.php

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@
252252
$available_license_paid_plan = is_object( $available_license ) ?
253253
$fs->_get_plan_by_id( $available_license->plan_id ) :
254254
null;
255+
256+
$is_dev_mode = ( defined( 'WP_FS__DEV_MODE' ) && WP_FS__DEV_MODE );
255257
?>
256258
<div class="wrap fs-section">
257259
<?php if ( ! $has_tabs && ! $fs->apply_filters( 'hide_account_tabs', false ) ) : ?>
@@ -787,7 +789,7 @@ class="fs-tag fs-<?php echo $fs->can_use_premium_code() ? 'success' : 'warn' ?>"
787789
<th><?php echo esc_html( $plan_text ) ?></th>
788790
<th><?php fs_esc_html_echo_x_inline( 'License', 'as software license', 'license', $slug ) ?></th>
789791
<th></th>
790-
<?php if ( defined( 'WP_FS__DEV_MODE' ) && WP_FS__DEV_MODE ) : ?>
792+
<?php if ( $is_dev_mode ) : ?>
791793
<th></th>
792794
<?php endif ?>
793795
</tr>
@@ -853,10 +855,20 @@ class="fs-tag fs-<?php echo $fs->can_use_premium_code() ? 'success' : 'warn' ?>"
853855
'is_whitelabeled' => ( $is_whitelabeled && ! $is_data_debug_mode )
854856
);
855857

856-
fs_require_template(
857-
'account/partials/addon.php',
858-
$addon_view_params
859-
);
858+
if ( ! empty($addon_view_params['addon_info'] ) ) {
859+
fs_require_template(
860+
'account/partials/addon.php',
861+
$addon_view_params
862+
);
863+
} else {
864+
// If we are here it means there is an activation of an unreleased add-on and yet the SDK is not in development mode.
865+
echo '<tr>';
866+
echo '<td style="text-align: right;">' . esc_html( $addon_id ) . '</td>';
867+
echo '<td colspan="' . ( $is_dev_mode ? 6 : 5 ) . '" style="text-align: left;">';
868+
echo 'The add-on you have activated is no longer <a href="https://freemius.com/help/documentation/wordpress/selling-add-ons-extensions/#preparing-the-add-on-for-sale" rel="noreferrer noopener" target="_blank">listed</a> by the product owner, or the SDK is not running in <a href="https://freemius.com/help/documentation/wordpress-sdk/testing/" rel="noreferrer noopener" target="_blank">test mode</a>. Please <a href="' . esc_url( $fs->contact_url() ) . '">contact support</a> if you need further assistance.';
869+
echo '</td>';
870+
echo '</tr>';
871+
}
860872

861873
$odd = ! $odd;
862874
} ?>

0 commit comments

Comments
 (0)