Skip to content

Commit 444cd11

Browse files
committed
version 1.0.11 released
1 parent a3781d5 commit 444cd11

5 files changed

Lines changed: 52 additions & 26 deletions

File tree

cbxscratingreview.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Plugin Name: CBX 5 Star Rating & Review
1616
* Plugin URI: https://codeboxr.com/product/cbx-single-criteria-rating-review-for-wordpress/
1717
* Description: Quick 5 star single Criteria Rating & Review for WordPress
18-
* Version: 1.0.9
18+
* Version: 1.0.11
1919
* Author: Codeboxr
2020
* Author URI: https://codeboxr.com
2121
* License: GPL-2.0+
@@ -33,7 +33,7 @@
3333

3434

3535
defined( 'CBXSCRATINGREVIEW_PLUGIN_NAME' ) or define( 'CBXSCRATINGREVIEW_PLUGIN_NAME', 'cbxscratingreview' );
36-
defined( 'CBXSCRATINGREVIEW_PLUGIN_VERSION' ) or define( 'CBXSCRATINGREVIEW_PLUGIN_VERSION', '1.0.9' );
36+
defined( 'CBXSCRATINGREVIEW_PLUGIN_VERSION' ) or define( 'CBXSCRATINGREVIEW_PLUGIN_VERSION', '1.0.11' );
3737
defined( 'CBXSCRATINGREVIEW_BASE_NAME' ) or define( 'CBXSCRATINGREVIEW_BASE_NAME', plugin_basename( __FILE__ ) );
3838
defined( 'CBXSCRATINGREVIEW_ROOT_PATH' ) or define( 'CBXSCRATINGREVIEW_ROOT_PATH', plugin_dir_path( __FILE__ ) );
3939
defined( 'CBXSCRATINGREVIEW_ROOT_URL' ) or define( 'CBXSCRATINGREVIEW_ROOT_URL', plugin_dir_url( __FILE__ ) );

includes/CBXSCRatingReviewMisc.php

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace CBXSCRatingReview;
34

45
// Prevent direct file access
@@ -55,8 +56,10 @@ public function add_module_to_script( $tag, $handle, $src ) {
5556
*/
5657
public function plugin_action_links( $links ) {
5758
$action_links = [
58-
'settings' => '<a style="color: #6648fe !important; font-weight: bold;" href="' . esc_url(admin_url( 'admin.php?page=cbxscratingreviewsettings' )) . '" aria-label="' . esc_attr__( 'View settings', 'cbxscratingreview' ) . '">' . esc_html__( 'Settings', 'cbxscratingreview' ) . '</a>',
59-
'translation' => '<a style="color: #6648fe !important; font-weight: bold;" target="_blank" href="https://translate.wordpress.org/projects/wp-plugins/cbxscratingreview/" aria-label="' . esc_attr__( 'Translations', 'cbxscratingreview' ) . '">' . esc_html__( 'Translations', 'cbxscratingreview' ) . '</a>',
59+
'settings' => '<a style="color: #6648fe !important; font-weight: bold;" href="' . esc_url( admin_url( 'admin.php?page=cbxscratingreviewsettings' ) ) . '" aria-label="' . esc_attr__( 'View settings',
60+
'cbxscratingreview' ) . '">' . esc_html__( 'Settings', 'cbxscratingreview' ) . '</a>',
61+
'translation' => '<a style="color: #6648fe !important; font-weight: bold;" target="_blank" href="https://translate.wordpress.org/projects/wp-plugins/cbxscratingreview/" aria-label="' . esc_attr__( 'Translations',
62+
'cbxscratingreview' ) . '">' . esc_html__( 'Translations', 'cbxscratingreview' ) . '</a>',
6063
];
6164

6265
return array_merge( $action_links, $links );
@@ -66,10 +69,10 @@ public function plugin_action_links( $links ) {
6669
/**
6770
* Add custom links to plugin row meta.
6871
*
69-
* @param array $links_array Existing plugin meta links.
70-
* @param string $plugin_file_name Plugin file name.
71-
* @param array $plugin_data Plugin data.
72-
* @param string $status Plugin status.
72+
* @param array $links_array Existing plugin meta links.
73+
* @param string $plugin_file_name Plugin file name.
74+
* @param array $plugin_data Plugin data.
75+
* @param string $status Plugin status.
7376
*
7477
* @return array
7578
*/
@@ -82,12 +85,12 @@ public function plugin_row_meta( $links_array, $plugin_file_name, $plugin_data,
8285
$base_class = 'cbxscratingreview-plugin-link';
8386

8487
$links = array(
85-
'free_support' => array(
88+
'free_support' => array(
8689
'url' => 'https://wordpress.org/support/plugin/cbxscratingreview/',
8790
'text' => esc_html__( 'Free Support', 'cbxscratingreview' ),
8891
'aria' => esc_attr( 'Free Support', 'cbxscratingreview' ),
8992
),
90-
'reviews' => array(
93+
'reviews' => array(
9194
'url' => 'https://wordpress.org/plugins/cbxscratingreview/#reviews',
9295
'text' => esc_html__( 'Reviews', 'cbxscratingreview' ),
9396
'aria' => esc_attr( 'Reviews', 'cbxscratingreview' ),
@@ -167,9 +170,12 @@ public function plugin_activate_upgrade_notices() {
167170
if ( get_transient( 'cbxscratingreview_activated_notice' ) ) {
168171
echo '<div style="border-left: 2px solid #6648fe;" class="notice notice-success is-dismissible">';
169172
/* translators: %s: Plugin version */
170-
echo '<p>' . sprintf( wp_kses( __( 'Thanks for installing/deactivating <strong>CBX 5 Star Rating & Review</strong> V%s - Codeboxr Team', 'cbxscratingreview' ), [ 'a' => ['target' => [] , 'href' => []] ]), esc_html(CBXSCRATINGREVIEW_PLUGIN_VERSION )) . '</p>';
173+
echo '<p>' . sprintf( wp_kses( __( 'Thanks for installing/deactivating <strong>CBX 5 Star Rating & Review</strong> V%s - Codeboxr Team', 'cbxscratingreview' ),
174+
[ 'a' => [ 'target' => [], 'href' => [] ] ] ), esc_html( CBXSCRATINGREVIEW_PLUGIN_VERSION ) ) . '</p>';
171175
/* translators: %1$s: Setting url , %2$s: Plugin url */
172-
echo '<p>' . sprintf( wp_kses( __( 'Check <a href="%1$s">Plugin Setting</a> | <a href="%2$s" target="_blank">Learn More</a>', 'cbxscratingreview' ), [ 'a' => ['target' => [] , 'href' => []] ]), esc_url(admin_url( 'admin.php?page=cbxscratingreviewsettings' )), esc_url('https://codeboxr.com/product/cbx-single-criteria-rating-review-for-wordpress/') ) . '</p>';
176+
echo '<p>' . sprintf( wp_kses( __( 'Check <a href="%1$s">Plugin Setting</a> | <a href="%2$s" target="_blank">Learn More</a>', 'cbxscratingreview' ),
177+
[ 'a' => [ 'target' => [], 'href' => [] ] ] ), esc_url( admin_url( 'admin.php?page=cbxscratingreviewsettings' ) ),
178+
esc_url( 'https://codeboxr.com/product/cbx-single-criteria-rating-review-for-wordpress/' ) ) . '</p>';
173179
echo '</div>';
174180
// Delete the transient so we don't keep displaying the activation message
175181
delete_transient( 'cbxscratingreview_activated_notice' );
@@ -182,9 +188,12 @@ public function plugin_activate_upgrade_notices() {
182188
if ( get_transient( 'cbxscratingreview_upgraded_notice' ) ) {
183189
echo '<div style="border-left: 2px solid #6648fe;" class="notice notice-success is-dismissible">';
184190
/* translators: %s: Plugin version */
185-
echo '<p>' . sprintf( wp_kses( __( 'Thanks for upgrading <strong>CBX 5 Star Rating & Review</strong> V%s , enjoy the new features and bug fixes - Codeboxr Team', 'cbxscratingreview' ) , [ 'a' => ['target' => [] , 'href' => []] ]), esc_html(CBXSCRATINGREVIEW_PLUGIN_VERSION) ) . '</p>';
191+
echo '<p>' . sprintf( wp_kses( __( 'Thanks for upgrading <strong>CBX 5 Star Rating & Review</strong> V%s , enjoy the new features and bug fixes - Codeboxr Team', 'cbxscratingreview' ),
192+
[ 'a' => [ 'target' => [], 'href' => [] ] ] ), esc_html( CBXSCRATINGREVIEW_PLUGIN_VERSION ) ) . '</p>';
186193
/* translators: %1$s: Setting url , %2$s: Plugin url */
187-
echo '<p>' . sprintf( wp_kses( __( 'Check <a href="%1$s">Plugin Setting</a> | <a href="%2$s" target="_blank">Learn More</a>', 'cbxscratingreview' ), [ 'a' => ['target' => [] , 'href' => []] ]), esc_url(admin_url( 'admin.php?page=cbxscratingreviewsettings' )), esc_url('https://codeboxr.com/product/cbx-single-criteria-rating-review-for-wordpress/') ) . '</p>';
194+
echo '<p>' . sprintf( wp_kses( __( 'Check <a href="%1$s">Plugin Setting</a> | <a href="%2$s" target="_blank">Learn More</a>', 'cbxscratingreview' ),
195+
[ 'a' => [ 'target' => [], 'href' => [] ] ] ), esc_url( admin_url( 'admin.php?page=cbxscratingreviewsettings' ) ),
196+
esc_url( 'https://codeboxr.com/product/cbx-single-criteria-rating-review-for-wordpress/' ) ) . '</p>';
188197
echo '</div>';
189198
// Delete the transient so we don't keep displaying the activation message
190199
delete_transient( 'cbxscratingreview_upgraded_notice' );
@@ -199,10 +208,12 @@ public function plugin_activate_upgrade_notices() {
199208
*/
200209
public function pro_addon_compatibility_campaign() {
201210
//if the pro addon is active or installed
202-
if ( !defined( 'CBXSCRATINGREVIEWPRO_PLUGIN_NAME' ) ) {
211+
if ( ! defined( 'CBXSCRATINGREVIEWPRO_PLUGIN_NAME' ) ) {
203212

204213
/* translators: %s: Plugin url */
205-
echo '<div style="border-left: 2px solid #6648fe;" class="notice notice-success is-dismissible"><p>' . sprintf( wp_kses( __( '<a target="_blank" href="%s">CBX 5 Star Rating & Review Pro Addon</a> has lots of pro and extended features, try it - Codeboxr Team', 'cbxscratingreview' ), [ 'a' => ['target' => [] , 'href' => []] ] ) , esc_url('https://codeboxr.com/product/cbx-single-criteria-rating-review-for-wordpress-pro-addon/') ) . '</p></div>';
214+
echo '<div style="border-left: 2px solid #6648fe;" class="notice notice-success is-dismissible"><p>' . sprintf( wp_kses( __( '<a target="_blank" href="%s">CBX 5 Star Rating & Review Pro Addon</a> has lots of pro and extended features, try it - Codeboxr Team',
215+
'cbxscratingreview' ), [ 'a' => [ 'target' => [], 'href' => [] ] ] ),
216+
esc_url( 'https://codeboxr.com/product/cbx-single-criteria-rating-review-for-wordpress-pro-addon/' ) ) . '</p></div>';
206217
}
207218
}//end pro_addon_compatibility_campaign
208219

@@ -214,24 +225,26 @@ public function pro_addon_compatibility_campaign() {
214225
*
215226
* @return void
216227
*/
217-
public function custom_message_after_plugin_row_proaddon($plugin_file, $plugin_data){
228+
public function custom_message_after_plugin_row_proaddon( $plugin_file, $plugin_data ) {
218229
if ( $plugin_file !== 'cbxscratingreviewpro/cbxscratingreviewpro.php' ) {
219230
return;
220231
}
221232

222233
//if pro addon is active then ignore this notification from core
223-
if(defined('CBXSCRATINGREVIEWPRO_PLUGIN_NAME')) return;
234+
if ( defined( 'CBXSCRATINGREVIEWPRO_PLUGIN_NAME' ) ) {
235+
return;
236+
}
224237

225-
$pro_addon_version = CBXSCRatingReviewHelper::get_any_plugin_version('cbxscratingreviewpro/cbxscratingreviewpro.php');
226-
$pro_latest_version = CBXSCRATINGREVIEWPRO_PLUGIN_VERSION;
238+
$pro_addon_version = CBXSCRatingReviewHelper::get_any_plugin_version( 'cbxscratingreviewpro/cbxscratingreviewpro.php' );
239+
$pro_latest_version = CBXSCRATINGREVIEW_PRO_VERSION;
227240

228-
if($pro_addon_version !== '' && version_compare( $pro_addon_version, $pro_latest_version, '<' ) ){
241+
if ( $pro_addon_version !== '' && version_compare( $pro_addon_version, $pro_latest_version, '<' ) ) {
229242
//$plugin_manual_update = 'https://codeboxr.com/manual-update-pro-addon/';
230243

231244

232-
233245
/* translators:translators: %s: plugin setting url for licence */
234-
$custom_message = wp_kses(sprintf( __( '<strong>Note:</strong> CBX 5 Star Rating & Review Pro Addon is custom plugin. <strong style="color: red;">It seems this plugin\'s current version is older than %2$s . To get the latest pro addon features, this plugin needs to upgrade to %2$s or later.</strong>', 'cbxscratingreview' ), $pro_latest_version, $pro_latest_version ), ['strong' => ['style' => []],'a' => ['href' => [], 'target' => []]]);
246+
$custom_message = wp_kses( sprintf( __( '<strong>Note:</strong> CBX 5 Star Rating & Review Pro Addon is custom plugin. <strong style="color: red;">It seems this plugin\'s current version is older than %2$s . To get the latest pro addon features, this plugin needs to upgrade to %2$s or later.</strong>',
247+
'cbxscratingreview' ), $pro_latest_version, $pro_latest_version ), [ 'strong' => [ 'style' => [] ], 'a' => [ 'href' => [], 'target' => [] ] ] );
235248

236249
// Output a row with custom content
237250
echo '<tr class="plugin-update-tr">

includes/Emails/CBXSCRatingReviewEmail.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,13 @@ public function style_inline( $content ) {
750750
//$logger->error( $e->getMessage(), array( 'source' => 'emogrifier' ) );
751751
}
752752
} else {
753-
$content = '<style>' . $css . '</style>' . $content;
753+
//$content = '<style>' . $css . '</style>' . $content;
754+
$content = preg_replace(
755+
'/(<head[^>]*>)/i',
756+
'$1<style>' . $css . '</style>',
757+
$content,
758+
1
759+
);
754760
}
755761
}
756762

readme.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: manchumahara, codeboxr
33
Tags: rating, review, business review, rating feedback
44
Requires at least: 3.7
55
Tested up to: 7.0
6-
Stable tag: 1.0.9
6+
Stable tag: 1.0.11
77
License: GPLv2 or later
88
License URI: http://www.gnu.org/licenses/gpl-2.0.html
99

@@ -119,6 +119,13 @@ The plugin is built with both site owners and developers in mind. It includes po
119119

120120
== Changelog ==
121121

122+
= 1.0.11 =
123+
* [fixed] Pro addon version checking issue fixed
124+
* [fixed] Email style issue fixed
125+
126+
= 1.0.10 =
127+
* [fixed] Fatal error fixed for version related logic checking
128+
122129
= 1.0.9 =
123130
* [new] WordPress 7 Compatible
124131
* [improvements] Improved readme.txt

0 commit comments

Comments
 (0)