Skip to content

Commit

Permalink
Merge pull request #425 from WPChill/dev
Browse files Browse the repository at this point in the history
update to 3.1.10
  • Loading branch information
razvanaldea89 authored Nov 21, 2023
2 parents c0a08c3 + a187a7a commit 6774107
Show file tree
Hide file tree
Showing 9 changed files with 158 additions and 26 deletions.
4 changes: 2 additions & 2 deletions admin/about/class-strong-testimonials-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function about_page() {
<div class="wpchill-text-center">
<div class="button-wrap-single clear">
<div class="right">
<?php $welcome->display_button( esc_html__( 'Upgrade Now', 'strong-testimonials' ), 'https://strongtestimonials.com/pricing/?utm_source=welcome_banner&utm_medium=upgradenow&utm_campaign=welcome_banner&utm_content=first_button','wpmtst-btn wpmtst-btn-block wpmtst-btn-lg', true, '#E76F51' ); ?>
<?php $welcome->display_button( esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade now', 'strong-testimonials' ) ) ), 'https://strongtestimonials.com/pricing/?utm_source=welcome_banner&utm_medium=upgradenow&utm_campaign=welcome_banner&utm_content=first_button','wpmtst-btn wpmtst-btn-block wpmtst-btn-lg', true, '#E76F51' ); ?>
</div>
</div>
</div>
Expand All @@ -127,7 +127,7 @@ public function about_page() {
<?php $welcome->display_button( esc_html__( 'Start Adding Testimonials', 'strong-testimonials' ), esc_url( admin_url( 'edit.php?post_type=wpm-testimonial' ) ),'wpmtst-btn wpmtst-btn-block wpmtst-btn-lg', true ); ?>
</div>
<div class="right">
<?php $welcome->display_button( esc_html__( 'Upgrade Now', 'strong-testimonials' ), 'https://strongtestimonials.com/pricing/?utm_source=welcome_banner&utm_medium=upgradenow&utm_campaign=welcome_banner&utm_content=second_button','wpmtst-btn wpmtst-btn-block wpmtst-btn-lg', true, '#E76F51' ); ?>
<?php $welcome->display_button( esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade now', 'strong-testimonials' ) ) ), 'https://strongtestimonials.com/pricing/?utm_source=welcome_banner&utm_medium=upgradenow&utm_campaign=welcome_banner&utm_content=second_button','wpmtst-btn wpmtst-btn-block wpmtst-btn-lg', true, '#E76F51' ); ?>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin/class-strong-testimonials-addons.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function render_addons() {
echo '</div>';
echo '</div>';
echo '<div class="wpmtst-addon-actions">';
echo wp_kses_post( apply_filters( 'wpmtst_addon_button_action', '<a href="' . esc_url( WPMTST_STORE_UPGRADE_URL . '?utm_source=st-lite&utm_campaign=upsell&utm_medium=' . esc_attr( $addon['slug'] ) ) . '" target="_blank" class="button primary-button">' . esc_html__( 'Upgrade now', 'strong-testimonials' ) . '</a>', $addon ) );
echo wp_kses_post( apply_filters( 'wpmtst_addon_button_action', '<a href="' . esc_url( WPMTST_STORE_UPGRADE_URL . '?utm_source=st-lite&utm_campaign=upsell&utm_medium=' . esc_attr( $addon['slug'] ) ) . '" target="_blank" class="button primary-button">' . esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade now', 'strong-testimonials' ) ) ) . '</a>', $addon ) );
echo '</div>';
echo '</div>';
}
Expand Down
156 changes: 139 additions & 17 deletions admin/class-strong-testimonials-upsell.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Strong_Testimonials_Upsell {
public $store_upgrade_url;

public function __construct() {
$this->set_offer();
$this->set_store_upgrade_url();
$options = get_option( 'wpmtst_options' );

Expand Down Expand Up @@ -178,7 +179,7 @@ public function output_importer_upsell() {
<li><?php esc_html_e( 'and more...', 'strong-testimonials' ) ?></li>
</ul>
<p>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=importer-metabox' ); ?>"><?php esc_html_e( 'Upgrade Now', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=importer-metabox' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade Now', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -207,7 +208,7 @@ public function general_upsell(){

<a href="<?php echo esc_url(WPMTST_STORE_URL . '/pricing?utm_source=st-lite&utm_campaign=upsell&utm_medium=general-settings-upsell'); ?>"
target="_blank" class="button button-primary button-hero"
style="width:100%;display:block;margin-top:20px;text-align:center;"><?php echo esc_html__('Upgrade now', 'strong-testimonials'); ?></a>
style="width:100%;display:block;margin-top:20px;text-align:center;"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade now', 'strong-testimonials' ) ) ); ?></a>

</div>
</div>
Expand Down Expand Up @@ -246,7 +247,7 @@ public function output_role_manager_page(){
);
?>
<p>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=role-management-tab-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=role-management-tab-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -286,7 +287,7 @@ public function output_country_selector_upsell() {
?>
<p>

<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=fields-country-selector-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=fields-country-selector-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -326,7 +327,7 @@ public function output_custom_fields_upsell() {
?>
<p>

<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=fields-custom-fields-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=fields-custom-fields-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -364,7 +365,7 @@ public function output_multiple_form_upsell() {
?>
<p>

<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=fields-multiple-forms-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=fields-multiple-forms-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -417,7 +418,7 @@ public function output_review_markup_upsell() {
<li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'With this extensions, search engines will display star ratings in search results for your site.', 'strong-testimonials' ); ?></li>
</ul>
<p>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=views-review-markup-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=views-review-markup-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -462,7 +463,7 @@ public function output_advanced_views_upsell() {
</ul>
<p>

<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=views-advanced-views-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=views-advanced-views-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -500,7 +501,7 @@ public function output_captcha_editor_upsell() {
);
?>
<p>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=form-settings-captcha-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=form-settings-captcha-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -554,7 +555,7 @@ public function output_captcha_form_settings_upsell() {
</table>
<p>
<a class="button button-primary" target="_blank"
href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=form-settings-captcha-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=form-settings-captcha-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -585,7 +586,7 @@ public function output_pro_templates_upsell() {
echo esc_html__( 'Impress your potential clients with profesionally designed, pixel-perfect templates that increase your chances of standing out and landing more clients.', 'strong-testimonials' )
?>
<p>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=views-pro-templates-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=views-pro-templates-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -628,7 +629,7 @@ public function output_enhanced_emails_upsell() {
<li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'keep your clients engaged and increase your chances of selling more', 'strong-testimonials' ); ?></li>
</ul>
<p>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=enhanced-emails-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=enhanced-emails-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -670,7 +671,7 @@ public function output_infinite_scroll_upsell() {
<li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'reduce your page\'s initial load time, making your site faster in the process and not driving clients away because of a slow loading website', 'strong-testimonials' ); ?></li>
</ul>
<p>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=infinite-scroll-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=infinite-scroll-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -713,7 +714,7 @@ public function output_filters_upsell() {
<li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'help potential clients appreciate the great work you do by showcasing reviews from other clients', 'strong-testimonials' ); ?></li>
</ul>
<p>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=filters-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=filters-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -764,7 +765,7 @@ public function output_assigment_upsell() {
);
?>
<p>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=assigment-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=assigment-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>

Expand Down Expand Up @@ -809,7 +810,7 @@ public function output_st_pro_upsell() {
<li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'Show testimonial form only for logged-in users.', 'strong-testimonials' ); ?></li>
</ul>
<p>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=setting-tab-st-pro-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=setting-tab-st-pro-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -861,7 +862,7 @@ public function output_properties_upsell() {
);
?>
<p>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=properties-upsell' ); ?>"><?php esc_html_e( 'Upgrade', 'strong-testimonials' ); ?></a>
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=properties-upsell' ); ?>"><?php echo esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade', 'strong-testimonials' ) ) ); ?></a>
</p>
</div>
<?php
Expand Down Expand Up @@ -917,6 +918,127 @@ public function upsells_page() {
echo '</div>';
}

/**
* Adds the filters and actions to add modula offers display by month
*
* @since 3.1.10
*/
private function set_offer(){
$month = date('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 );
}
}

/**
* Replaces upsells button with Black Friday text buttons
*
* @since 3.1.10
*/
public function bf_buttons( $text ){
return __( '40% OFF for Black Friday', 'strong-testimonials' );
}

/**
* Replaces upsells button with Christmas text buttons
*
* @since 3.1.10
*/
public function xmas_buttons( $text ){
return __( '25% OFF for Christmas', 'strong-testimonials' );
}

/**
* Echoes Black Friday script to footer
*
* @since 3.1.10
*/
public function footer_bf_styles(){

$css = '<style>
#wpbody-content .wpmtst-alert {
color: #fff;
background-color: #000;
}
#wpbody-content .wpmtst-alert h3,
#wpbody-content .wpmtst-alert h2,
#wpbody-content .wpmtst-alert table label{
color: #fff;
}
#wpbody-content .wpmtst-alert > a,
#wpbody-content .wpmtst-alert li span a {
color: #f8003e;
}
#wpbody-content .wpmtst-alert .button.button-primary{
background-color: #f8003e;
border: none;
color: #fff;
font-weight: 600;
}
#wpbody-content .wpmtst-alert .button.button-primary:hover {
background-color: red;
border: none;
color: #fff;
font-weight: 600;
}
</style>';
echo $css;
}

/**
* Echoes Christmas style to footer
*
* @since 3.1.10
*/
public function footer_xmas_styles(){

$css = '<style>
#wpbody-content .wpmtst-alert::before{
content: "";
position: absolute;
width: 100%;
height: 50px;
background-image: url(' . WPMTST_ADMIN_URL . 'img/upsells/x-mas.jpg' .');
background-position-x: 15px;
left: 0;
top: 0;
background-size: contain;
z-index: 0;
}
#wpbody-content .wpmtst-alert .button.button-primary {
background-color: #f8003e;
border: none;
color: #fff;
font-weight: 600;
}
#wpbody-content .wpmtst-alert .button.button-primary:hover {
background-color: red;
border: none;
color: #fff;
font-weight: 600;
}
#wpbody-content .wpmtst-alert{
margin-top: 10px;
position: relative;
padding-top: 60px;
background-color: #fff;
}
#wpbody-content .inside .wpmtst-alert{
margin-top: unset;
}
</style>';
echo $css;
}
}


new Strong_Testimonials_Upsell();
Binary file added admin/img/upsells/x-mas.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
= 3.1.10 - 21.11.2023 -
- Added: Filter to modify admin notification method's form options( [#422](https://github.com/WPChill/strong-testimonials/issues/422) )
- Added: Upsells seasonal offers.

= 3.1.9 - 19.09.2023 -
- Fixed: Automatic excerpt elipsis[...] always hidden after first readmore click ( [#413](https://github.com/WPChill/strong-testimonials/issues/413) )
- Fixed: Compatibility with Elementor tabs ( [#288](https://github.com/WPChill/strong-testimonials/issues/288) )
Expand Down
4 changes: 3 additions & 1 deletion includes/class-strong-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,9 @@ public function handle_upload( $file_handler, $overrides ) {
* Trimming subject and message strings.
*/
public function notify_admin( $post, $form_name = 'custom' ) {
$form_options = get_option( 'wpmtst_form_options' );

$form_options = apply_filters( 'wpmtst_notify_admin_form_options', get_option( 'wpmtst_form_options' ), $post, $form_name );

if ( ! $form_options['admin_notify'] ) {
return;
}
Expand Down
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.1.9",
"version": "3.1.10",
"license": "GPL v3",
"scripts": {
"build": "webpack",
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: wpchill,silkalns,cdillon27
Tags: testimonials, testimonial slider, testimonial form, star ratings
Requires at least: 5.2
Requires PHP: 5.6
Tested up to: 6.3
Stable tag: 3.1.9
Tested up to: 6.4
Stable tag: 3.1.10
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

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

== Changelog ==
= 3.1.10 - 21.11.2023 -
- Added: Filter to modify admin notification method's form options( [#422](https://github.com/WPChill/strong-testimonials/issues/422) )
- Added: Upsells seasonal offers.

= 3.1.9 - 19.09.2023 -
- Fixed: Automatic excerpt elipsis[...] always hidden after first readmore click ( [#413](https://github.com/WPChill/strong-testimonials/issues/413) )
- Fixed: Compatibility with Elementor tabs ( [#288](https://github.com/WPChill/strong-testimonials/issues/288) )
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.1.9
* Version: 3.1.10
* 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.1.9' );
define( 'WPMTST_VERSION', '3.1.10' );

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

0 comments on commit 6774107

Please sign in to comment.