Skip to content

Commit

Permalink
Tag 2.9.1 (#1377)
Browse files Browse the repository at this point in the history
Tag 2.9.1
  • Loading branch information
thrijith authored Jan 21, 2020
2 parents 1a029be + 6ce57db commit f9e1114
Show file tree
Hide file tree
Showing 29 changed files with 487 additions and 400 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "laterpay/laterpay-wordpress-plugin",
"description": "This is the official LaterPay plugin for selling digital content with WordPress",
"license": "MIT",
"version": "2.9.0",
"version": "2.9.1",
"config": {
"vendor-dir": "laterpay/vendor",
"secure-http": true
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

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

2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var gulp = require('gulp'),
// OPTIONS -------------------------------------------------------------------------------------------------------------
var gulpKnownOptions = {
string: 'version',
default: { version: '2.9.0' }
default: { version: '2.9.1' }
};
var gulpOptions = minimist(process.argv.slice(2), gulpKnownOptions);
gulpOptions.svn = {};
Expand Down
15 changes: 10 additions & 5 deletions laterpay/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Contributors: laterpay, dominik-rodler, mihail-turalenka, avahura, ahryb
Donate link: https://laterpay.net
Tags: Contribution, Conversion, Earn Money, Micropayment, Monetization, Monetize Content, Paid Content, Payment, Paywall, Sell Article, Sell Content, Subscription
Tags: contribution, conversion, earn-money, micropayment, monetization, monetize-content, paid-content, payment, paywall, sell-article, sell-content, subscription
Requires at least: 4.6
Tested up to: 5.3.1
Tested up to: 5.3.2
Requires PHP: 5.6
Stable tag: 2.9.0
Stable tag: 2.9.1
Author URI: https://laterpay.net
Plugin URI: https://github.com/laterpay/laterpay-wordpress-plugin
License: MIT
Expand Down Expand Up @@ -90,6 +90,11 @@ Yes!
7. The plugin provides a variety of advanced settings to customize the LaterPay plugin and adjust it to your needs.

== Changelog ==
= 2.9.1 ( January 21, 2020 ) =
* Allow customization of Purchase button text hover color in "LaterPay > Appearance" tab.
* Allow merchant to make a Post FREE, for post's having premium categories.
* Default the type to TimePass in `[laterpay_redeem_voucher]` shortcode.

= 2.9.0 ( December 19, 2019 ) =
* Add Shortcode Generator to allow creation of Purchase Button Shortcode in Classic Editor.
* Add Shortcode Generator to allow creation of Premium Download Box Shortcode in Classic Editor.
Expand Down Expand Up @@ -694,8 +699,8 @@ KNOWN BUGS:

== Upgrade notice ==

= 2.9.0 =
Introduces Shortcode Generator to take in Classic Editor.
= 2.9.1 =
Add support for customization of Purchase Button Text Hover Color in "LaterPay > Appearance" tab, other minor bug fixes in LaterPay functionality.

== Arbitrary section ==

Expand Down
4 changes: 2 additions & 2 deletions laterpay/application/Controller/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,8 @@ public static function register_common_scripts( $page, $data_for_localize = [] )

if ( ! empty( $ga_data['update_highlights']['version'] ) ) {
$version_update_number = $ga_data['update_highlights']['version'];
$ga_data['update_highlights']['version'] = sprintf( esc_html__( 'Version %s Highlights:', 'laterpay' ), $version_update_number );
$ga_data['update_highlights']['notice'] = esc_html__( 'Introduces LaterPay Shortcode Generator for Classic Editor!', 'laterpay' );
$ga_data['update_highlights']['version'] = '';
$ga_data['update_highlights']['notice'] = '';
$ga_data['update_highlights_nonce'] = wp_create_nonce( 'update_highlights_nonce' );
}

Expand Down
18 changes: 10 additions & 8 deletions laterpay/application/Controller/Admin/Appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,21 +205,23 @@ public static function process_ajax_requests( LaterPay_Core_Event $event ) {
$description_text_color = filter_input( INPUT_POST, 'description_text_color', FILTER_SANITIZE_STRING );
$button_background_color = filter_input( INPUT_POST, 'button_background_color', FILTER_SANITIZE_STRING );
$button_hover_color = filter_input( INPUT_POST, 'button_hover_color', FILTER_SANITIZE_STRING );
$button_hover_text_color = filter_input( INPUT_POST, 'button_hover_text_color', FILTER_SANITIZE_STRING );
$button_text_color = filter_input( INPUT_POST, 'button_text_color', FILTER_SANITIZE_STRING );
$link_main_color = filter_input( INPUT_POST, 'link_main_color', FILTER_SANITIZE_STRING );
$link_hover_color = filter_input( INPUT_POST, 'link_hover_color', FILTER_SANITIZE_STRING );
$footer_background_color = filter_input( INPUT_POST, 'footer_background_color', FILTER_SANITIZE_STRING );

update_option( 'laterpay_overlay_header_bg_color', $header_background_color );
update_option( 'laterpay_overlay_main_bg_color', $background_color );
update_option( 'laterpay_overlay_main_text_color', $main_text_color );
update_option( 'laterpay_overlay_header_bg_color', $header_background_color );
update_option( 'laterpay_overlay_main_bg_color', $background_color );
update_option( 'laterpay_overlay_main_text_color', $main_text_color );
update_option( 'laterpay_overlay_description_color', $description_text_color );
update_option( 'laterpay_main_color', $button_background_color );
update_option( 'laterpay_hover_color', $button_hover_color );
update_option( 'laterpay_main_color', $button_background_color );
update_option( 'laterpay_hover_color', $button_hover_color );
update_option( 'laterpay_overlay_button_hover_text_color', $button_hover_text_color );
update_option( 'laterpay_overlay_button_text_color', $button_text_color );
update_option( 'laterpay_overlay_link_main_color', $link_main_color );
update_option( 'laterpay_overlay_link_hover_color', $link_hover_color );
update_option( 'laterpay_overlay_footer_bg_color', $footer_background_color );
update_option( 'laterpay_overlay_link_main_color', $link_main_color );
update_option( 'laterpay_overlay_link_hover_color', $link_hover_color );
update_option( 'laterpay_overlay_footer_bg_color', $footer_background_color );

$event->set_result(
array(
Expand Down
7 changes: 6 additions & 1 deletion laterpay/application/Controller/Frontend/Shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,18 @@ public function render_redeem_gift_code( LaterPay_Core_Event $event ) {
'type' => '',
), $atts );

// If ID is not empty and type is empty then default type should be 'timepass'.
if ( ! empty( $data['id'] ) && empty( $data['type'] ) ) {
$data['type'] = 'timepass';
}

$allowed_types = [ 'timepass', 'subscription' ];
$data['type'] = strtolower( trim( $data['type'] ) );
$data['type'] = in_array( $data['type'], $allowed_types, true ) ? $data['type'] : '';

$pass_data = array();

// get a specific time pass, if an ID was provided; otherwise get all time passes
// Get a specific time pass, if an ID was provided; otherwise get all time passes.
if ( $data['id'] ) {

if ( 'subscription' === $data['type'] ) {
Expand Down
4 changes: 1 addition & 3 deletions laterpay/application/Controller/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,7 @@ public function add_update_highlights() {

if ( ! empty( $current_version ) ) {

$update_highlights = [
'version' => '2.9.0',
];
$update_highlights = [];

update_option( 'lp_update_highlights', $update_highlights );
return;
Expand Down
Loading

0 comments on commit f9e1114

Please sign in to comment.