Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.7 #63

Merged
merged 17 commits into from
Jul 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Requires at least: 4.2

Tested up to: 4.8.0

Stable tag: 2.0.6
Stable tag: 2.0.7

License: GPLv2 or later

Expand Down Expand Up @@ -133,6 +133,9 @@ Log in to your stripe's account or create one at https://dashboard.stripe.com/re

== Changelog ==

=2.0.7=
* Restored original Stripe styles as an option in settings

=2.0.6=
* Added argument zero_decimal to shortcode to use zero decimal amount values in donation

Expand Down
2 changes: 1 addition & 1 deletion assets/public/dist/css/style.css

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

3 changes: 2 additions & 1 deletion assets/public/src/scss/ds/_main.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@import "button";
@import "spinner";
@import "spinner";
@import "stripe_default";
1 change: 1 addition & 0 deletions assets/public/src/scss/ds/_stripe_default.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.original-stripe-button{overflow:hidden;display:inline-block;visibility:visible !important;padding: 0.5rem 1rem;background-image:-webkit-linear-gradient(#28a0e5,#015e94);background-image:-moz-linear-gradient(#28a0e5,#015e94);background-image:-ms-linear-gradient(#28a0e5,#015e94);background-image:-o-linear-gradient(#28a0e5,#015e94);background-image:-webkit-linear-gradient(#28a0e5,#015e94);background-image:-moz-linear-gradient(#28a0e5,#015e94);background-image:-ms-linear-gradient(#28a0e5,#015e94);background-image:-o-linear-gradient(#28a0e5,#015e94);background-image:linear-gradient(#28a0e5,#015e94);-webkit-font-smoothing:antialiased;border:0;text-decoration:none;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.2);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.2);-ms-box-shadow:0 1px 0 rgba(0,0,0,0.2);-o-box-shadow:0 1px 0 rgba(0,0,0,0.2);box-shadow:0 1px 0 rgba(0,0,0,0.2);-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:pointer}.original-stripe-button::-moz-focus-inner{border:0;padding:0}.original-stripe-button span{display:block;position:relative;padding:0 12px;height:30px;line-height:30px;background:#1275ff;background-image:-webkit-linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);background-image:-moz-linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);background-image:-ms-linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);background-image:-o-linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);background-image:-webkit-linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);background-image:-moz-linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);background-image:-ms-linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);background-image:-o-linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);background-image:linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);font-size:14px;color:#fff;font-weight:bold;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;text-shadow:0 -1px 0 rgba(0,0,0,0.25);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25);-ms-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25);-o-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25);box-shadow:inset 0 1px 0 rgba(255,255,255,0.25);-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.original-stripe-button:not(:disabled):active,.original-stripe-button.active{background:#005d93}.original-stripe-button:not(:disabled):active span,.original-stripe-button.active span{color:#eee;background:#008cdd;background-image:-webkit-linear-gradient(#008cdd,#008cdd 85%,#239adf);background-image:-moz-linear-gradient(#008cdd,#008cdd 85%,#239adf);background-image:-ms-linear-gradient(#008cdd,#008cdd 85%,#239adf);background-image:-o-linear-gradient(#008cdd,#008cdd 85%,#239adf);background-image:-webkit-linear-gradient(#008cdd,#008cdd 85%,#239adf);background-image:-moz-linear-gradient(#008cdd,#008cdd 85%,#239adf);background-image:-ms-linear-gradient(#008cdd,#008cdd 85%,#239adf);background-image:-o-linear-gradient(#008cdd,#008cdd 85%,#239adf);background-image:linear-gradient(#008cdd,#008cdd 85%,#239adf);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1);-ms-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1);-o-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 rgba(0,0,0,0.1)}.original-stripe-button:disabled,.original-stripe-button.disabled{background:rgba(0,0,0,0.2);-webkit-box-shadow:none;-moz-box-shadow:none;-ms-box-shadow:none;-o-box-shadow:none;box-shadRow:none}.original-stripe-button:disabled span,.original-stripe-button.disabled span{color:#999;background:#f8f9fa;text-shadow:0 1px 0 rgba(255,255,255,0.5)}
2 changes: 1 addition & 1 deletion direct-stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @wordpress-plugin
* Plugin Name: Direct Stripe
* Description: Use Stripe payment buttons anywhere in a WordPress website, let your users easily proceed to checkout
* Version: 2.0.6
* Version: 2.0.7
* Author: Nicolas Figueira
* Author URI: https://newo.me
* Text Domain: direct-stripe
Expand Down
12 changes: 9 additions & 3 deletions includes/class-display-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,15 @@ function direct_stripe_rememberme_option_checkbox_render() {
/********* Checkbox for stylesheet **********/
function direct_stripe_use_custom_styles_render() {
$d_stripe_options = get_option( 'direct_stripe_styles_settings' );
$checked = $d_stripe_options['direct_stripe_use_custom_styles'];
?>
<input type='checkbox' name='direct_stripe_styles_settings[direct_stripe_use_custom_styles]' value='1' <?php checked( isset ( $d_stripe_options['direct_stripe_use_custom_styles'] ), 1 ); ?> />
<?php
<p><input type='radio' name='direct_stripe_styles_settings[direct_stripe_use_custom_styles]' value='3' <?php if( $checked != '1' && $checked != '2' ) { ?> checked <?php }; ?> />
Do not set styles</p>
<p><input type='radio' name='direct_stripe_styles_settings[direct_stripe_use_custom_styles]' value='2' <?php if( $checked === '2') { ?> checked <?php }; ?> />
Use default stripe styles</p>
<p><input type='radio' name='direct_stripe_styles_settings[direct_stripe_use_custom_styles]' value='1' <?php if( $checked === '1') { ?> checked <?php }; ?> />
Use styles set underneath</p>
<?php
}
//Main button color
function direct_stripe_main_color_style_render() {
Expand Down Expand Up @@ -474,7 +480,7 @@ public function direct_stripe_styles_settings_validation( $input ) {
}
// Make sure isauthorized is only true or false (0 or 1)
if( isset($input['direct_stripe_use_custom_styles']) && !empty($input['direct_stripe_use_custom_styles']) ) {
$input['direct_stripe_use_custom_styles'] = '1';
$input['direct_stripe_use_custom_styles'] = sanitize_text_field( $input['direct_stripe_use_custom_styles'] );
}
if( isset($input['direct_stripe_use_tc_checkbox']) && !empty($input['direct_stripe_use_tc_checkbox']) ) {
$input['direct_stripe_use_tc_checkbox'] = '1';
Expand Down
4 changes: 3 additions & 1 deletion includes/ds-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

<?php //Custom styles button conditions
if( isset($d_stripe_styles['direct_stripe_use_custom_styles']) && $d_stripe_styles['direct_stripe_use_custom_styles'] === '1' ) {
$ds_button_class = 'direct-stripe-button';
$ds_button_class = 'direct-stripe-button';
} elseif( isset($d_stripe_styles['direct_stripe_use_custom_styles']) && $d_stripe_styles['direct_stripe_use_custom_styles'] === '2' ) {
$ds_button_class = 'original-stripe-button';
} else {
$ds_button_class = 'stripe-button-ds';
}
Expand Down
2 changes: 1 addition & 1 deletion includes/register-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
);
add_settings_field(
'direct_stripe_use_custom_styles',
__( 'Use custom styles', 'direct-stripe' ),
__( 'Choose button styles', 'direct-stripe' ),
array($displaysettings, 'direct_stripe_use_custom_styles_render'),
'directStripeStyles',
'direct_stripe_styles_section'
Expand Down
Loading