Skip to content

Commit

Permalink
Merge pull request #491 from WPChill/3.2.1
Browse files Browse the repository at this point in the history
3.2.1
  • Loading branch information
TeoAlex authored Dec 17, 2024
2 parents d019b03 + cbc1a59 commit ae4d6d8
Show file tree
Hide file tree
Showing 11 changed files with 119 additions and 94 deletions.
8 changes: 0 additions & 8 deletions admin/class-strong-testimonials-admin-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ public static function admin_register() {
true
);

wp_register_script(
'wpmtst-admin-script',
WPMTST_ASSETS_JS . 'admin.js',
array( 'jquery', 'underscore' ),
$plugin_version,
true
);

wp_register_style(
'wpmtst-admin-global-style',
WPMTST_ASSETS_CSS . 'admin-global.css',
Expand Down
88 changes: 20 additions & 68 deletions admin/class-strong-testimonials-lite-vs-pro-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class Strong_Testimonials_Lite_Vs_PRO_Page {

public function __construct() {
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
add_action( 'admin_print_footer_scripts', array( $this, 'inline_script_for_redirection' ) );

add_filter( 'wpmtst_submenu_pages', array( $this, 'add_submenu' ) );

// Upgrade to PRO plugin action link
Expand Down Expand Up @@ -56,82 +58,32 @@ public function get_submenu() {
'page_title' => esc_html__( 'Lite vs Pro', 'strong-testimonials' ),
'menu_title' => esc_html__( 'Lite vs Pro', 'strong-testimonials' ),
'capability' => 'strong_testimonials_options',
'menu_slug' => 'strong-testimonials-lite-vs-pro',
'menu_slug' => '#st-lite-vs-pro',
'function' => array( $this, 'render_page' ),
);
}

public function render_page() {
return;
}

$addons = new Strong_Testimonials_Addons();
public function inline_script_for_redirection() {
?>
<div class="wrap wpmtst-lite-vs-premium">
<hr class="wp-header-end" />
<h1><?php echo esc_html__( 'LITE vs PRO', 'strong-testimonials' ); ?> </h1>
<div class="free-vs-premium">
<!-- Table header -->
<div class="wpchill-plans-table table-header">
<div class="wpchill-pricing-package wpchill-empty">
<!--This is an empty div so that we can have an empty corner-->
</div>
<div class="wpchill-pricing-package wpchill-title">
<p class="wpchill-name"><strong>PRO</strong></p>
</div>
<div class="wpchill-pricing-package wpchill-title wpchill-wpmtst-lite">
<p class="wpchill-name"><strong>LITE</strong></p>
</div>
</div>
<!-- Table content -->

<?php
foreach ( $addons->get_addons() as $pro ) {
?>
<div class="wpchill-plans-table">
<div class="wpchill-pricing-package feature-name">
<h3><?php echo esc_html( $pro['name'] ); ?></h3>
<p class="tab-header-description wpmtst-tooltip-content">
<?php echo esc_html( $pro['description'] ); ?>
</p>
</div>
<div class="wpchill-pricing-package">
<span class="dashicons dashicons-saved"></span>
</div>
<div class="wpchill-pricing-package">
<span class="dashicons dashicons-no-alt"></span>
</div>
</div>
<?php
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
const link = document.querySelector('a[href*="edit.php?post_type=wpm-testimonial&page=#st-lite-vs-pro"]');
if (link) {
link.addEventListener('click', function(event) {
event.preventDefault();

window.open(
'https://strongtestimonials.com/free-vs-pro/?utm_source=st-lite&utm_medium=link&utm_campaign=upsell&utm_term=lite-vs-pro',
'_blank'
);
});
}
?>
<!-- Support -->
<div class="wpchill-plans-table">
<div class="wpchill-pricing-package feature-name">
<h3><?php esc_html_e( 'Support', 'strong-testimonials' ); ?></h3>
</div>
<div class="wpchill-pricing-package">Priority</div>
<div class="wpchill-pricing-package"><a href="https://wordpress.org/support/plugin/strong-testimonials/"
target="_blank">wp.org</a>
</div>
</div>
<!-- Table footer -->
<div class="wpchill-plans-table tabled-footer">
<div class="wpchill-pricing-package wpchill-empty">
<!--This is an empty div so that we can have an empty corner-->
</div>
<div class="wpchill-pricing-package wpchill-title wpchill-wpmtst-grid-gallery-business">

<a href="https://strongtestimonials.com/pricing/?utm_source=strong-testimonials&utm_medium=lite-vs-pro&utm_campaign=upsell" target="_blank"
class="button button-primary button-hero "><span class="dashicons dashicons-cart"></span>
<?php esc_html_e( 'Upgrade now!', 'strong-testimonials' ); ?> </a>

</div>
<div class="wpchill-pricing-package wpchill-title wpchill-wpmtst-lite">


</div>
</div>
</div>
</div>
});
</script>
<?php
}
}
2 changes: 1 addition & 1 deletion admin/class-strong-testimonials-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Strong_Testimonials_Updater {
*
* @var string
*/
private static $old_version;
private static $old_version = '3.0.0';

/**
* Log steps during update process.
Expand Down
20 changes: 10 additions & 10 deletions admin/class-strong-testimonials-upsell.php
Original file line number Diff line number Diff line change
Expand Up @@ -952,16 +952,16 @@ public function upsells_page() {
* @since 3.1.10
*/
private function set_offer() {
$month = gmdate( 'm' );

if ( '11' === $month ) {
add_filter( 'wpmtst_upsells_button_text', array( $this, 'bf_buttons' ), 15 );
add_action( 'admin_print_styles', array( $this, 'footer_bf_styles' ), 999 );
}
if ( '12' === $month ) {
add_filter( 'wpmtst_upsells_button_text', array( $this, 'xmas_buttons' ), 15 );
add_action( 'admin_print_styles', array( $this, 'footer_xmas_styles' ), 999 );
}
// $month = gmdate( 'm' );

// if ( '11' === $month ) {
// add_filter( 'wpmtst_upsells_button_text', array( $this, 'bf_buttons' ), 15 );
// add_action( 'admin_print_styles', array( $this, 'footer_bf_styles' ), 999 );
// }
// if ( '12' === $month ) {
// add_filter( 'wpmtst_upsells_button_text', array( $this, 'xmas_buttons' ), 15 );
// add_action( 'admin_print_styles', array( $this, 'footer_xmas_styles' ), 999 );
// }
}

/**
Expand Down
4 changes: 4 additions & 0 deletions admin/class-wpmtst-admin-helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ class="dashicons dashicons-external"></span><?php esc_html_e( 'Documentation', '
href="https://strongtestimonials.com/contact-us/" target="_blank"><span
class="dashicons dashicons-email-alt"></span><?php echo esc_html__( 'Contact us for support!', 'strong-testimonials' ); ?>
</a>
<a class="button button-secondary"
href="https://strongtestimonials.com/changelog/?utm_source=st-lite&utm_medium=link&utm_campaign=settings&utm_term=changelog" target="_blank"><span
class="dashicons dashicons-editor-ol"></span><?php echo esc_html__( 'Changelog', 'strong-testimonials' ); ?>
</a>
</div>
</div>
<?php
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
= 3.2.1 - 17.12.2024 -
- Changed: Disabled seasonal promotions notifications.
- Fixed: Javascript error in admin.

3.2.0 - 13.11.2024 -
- Fixed: Modern view tempalte path to quote marks was not correct. ( [#474](https://github.com/WPChill/strong-testimonials/issues/474) )
- Removed: License functionality
Expand Down
2 changes: 1 addition & 1 deletion includes/scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function wpmtst_scripts() {
'imagesloaded',
WPMTST_PUBLIC_URL . 'js/lib/imagesloaded/imagesloaded.pkgd.min.js',
array(),
'3.2.0',
'3.2.1',
true
);
}
Expand Down
73 changes: 71 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "strong-testimonials",
"author": "WPChill",
"version": "3.2.0",
"version": "3.2.1",
"license": "GPL v3",
"scripts": {
"build": "cross-env NODE_ENV=production wp-scripts build --config webpack.config.js",
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: testimonials, testimonial slider, testimonial form, star ratings
Requires at least: 5.2
Requires PHP: 5.6
Tested up to: 6.7
Stable tag: 3.2.0
Stable tag: 3.2.1
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -199,6 +199,10 @@ No. If you already have testimonials in another plugin or theme, you will have t
8. View editor

== Changelog ==
= 3.2.1 - 17.12.2024 -
- Changed: Disabled seasonal promotions notifications.
- Fixed: Javascript error in admin.

= 3.2.0 - 13.11.2024 -
- Fixed: Modern view tempalte path to quote marks was not correct. ( [#474](https://github.com/WPChill/strong-testimonials/issues/474) )
- Removed: License functionality
Expand Down
4 changes: 2 additions & 2 deletions strong-testimonials.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Collect and display your testimonials or reviews.
* Author: WPChill
* Author URI: https://wpchill.com/
* Version: 3.2.0
* Version: 3.2.1
* Text Domain: strong-testimonials
* Domain Path: /languages
* Requires: 4.6 or higher
Expand Down Expand Up @@ -45,7 +45,7 @@
exit;
}

define( 'WPMTST_VERSION', '3.2.0' );
define( 'WPMTST_VERSION', '3.2.1' );

define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
Expand Down

0 comments on commit ae4d6d8

Please sign in to comment.