Changeset 2367448
- Timestamp:
- 08/23/2020 07:00:30 PM (6 years ago)
- Location:
- transact
- Files:
-
- 3 edited
- 6 copied
-
tags/5.1.4 (copied) (copied from transact/trunk)
-
tags/5.1.4/frontend/assets/transact_post.js (copied) (copied from transact/trunk/frontend/assets/transact_post.js)
-
tags/5.1.4/frontend/controllers/transact-api.php (copied) (copied from transact/trunk/frontend/controllers/transact-api.php)
-
tags/5.1.4/frontend/controllers/transact-single-post.php (copied) (copied from transact/trunk/frontend/controllers/transact-single-post.php) (10 diffs)
-
tags/5.1.4/readme.txt (copied) (copied from transact/trunk/readme.txt) (2 diffs)
-
tags/5.1.4/transact-plugin.php (copied) (copied from transact/trunk/transact-plugin.php) (1 diff)
-
trunk/frontend/controllers/transact-single-post.php (modified) (10 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/transact-plugin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
transact/tags/5.1.4/frontend/controllers/transact-single-post.php
r2348646 r2367448 40 40 const DISABLE = 4; 41 41 const INLINE_COMMENTS_OUTPUT = true; 42 42 43 43 /** 44 44 * config controller … … 332 332 333 333 if(!$existing_user) { 334 $existing_user = get_user_by( 'email', $user_email ); 335 } 336 337 if(!$existing_user) { 334 338 $bytes = random_bytes(16); 335 339 $wp_userid = wp_insert_user( … … 343 347 ); 344 348 345 $accountMeta->connect_xsact_id_meta($wp_userid, $xsact_user_id);346 349 } else { 347 350 $wp_userid = $existing_user->ID; 348 351 349 352 if ($existing_user->display_name !== $user_display_name) { 350 353 wp_update_user( … … 357 360 } 358 361 } 362 $accountMeta->connect_xsact_id_meta($wp_userid, $xsact_user_id); 359 363 360 364 // If we are only checking premium, don't log the user in if they don't have premium … … 460 464 $raw = apply_filters('the_content', $post_object->post_content); 461 465 $blocks = parse_blocks( $raw ); 462 466 463 467 foreach ( $blocks as $block ) { 464 468 // Dont include preview content in premium output … … 472 476 473 477 } 474 478 475 479 if($button_controller->get_if_article_donation()) { 476 480 $result_content = $result_content . $button_controller->print_donation_button(); … … 650 654 $post_object = get_post($this->post_id); 651 655 $has_premium = $this->post_has_premium($transact, $post_object); 652 656 653 657 if(!$premium && $has_premium) { 654 658 $nonce_field = wp_nonce_field( 'transact_purchase_buttons', 'transact_purchase_buttons_nonce', true, false ); … … 661 665 $count_words = str_word_count(wp_strip_all_tags($content)); 662 666 } 663 667 664 668 if($button_controller->get_if_article_donation()) { 665 669 $content = $content . $button_controller->print_donation_button($count_words); … … 668 672 } 669 673 } 670 674 671 675 $content = '<div id="transact_content">' . $content . '</div>'; 672 676 } … … 863 867 return false; 864 868 } 865 return (isset($premium_from_meta) && $premium_from_meta !== '') || 869 return (isset($premium_from_meta) && $premium_from_meta !== '') || 866 870 ($post_object && strpos($post_object->post_content, 'transact/premium-content') > -1); 867 871 -
transact/tags/5.1.4/readme.txt
r2348646 r2367448 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.4.2 8 Stable tag: 5.1. 38 Stable tag: 5.1.4 9 9 License: APACHE-2.0 10 10 License URI: https://www.apache.org/licenses/LICENSE-2.0 … … 82 82 83 83 84 = 5.1.4 = 85 * Check for already exising email registration. 86 84 87 = 5.1.3 = 85 88 * improve zero price checks -
transact/tags/5.1.4/transact-plugin.php
r2348646 r2367448 3 3 * Plugin Name: transact.io 4 4 * Description: Integrates transact.io services into WP 5 * Version: 5.1. 35 * Version: 5.1.4 6 6 * Author: transact.io 7 7 * Author URI: https://transact.io -
transact/trunk/frontend/controllers/transact-single-post.php
r2348646 r2367448 40 40 const DISABLE = 4; 41 41 const INLINE_COMMENTS_OUTPUT = true; 42 42 43 43 /** 44 44 * config controller … … 332 332 333 333 if(!$existing_user) { 334 $existing_user = get_user_by( 'email', $user_email ); 335 } 336 337 if(!$existing_user) { 334 338 $bytes = random_bytes(16); 335 339 $wp_userid = wp_insert_user( … … 343 347 ); 344 348 345 $accountMeta->connect_xsact_id_meta($wp_userid, $xsact_user_id);346 349 } else { 347 350 $wp_userid = $existing_user->ID; 348 351 349 352 if ($existing_user->display_name !== $user_display_name) { 350 353 wp_update_user( … … 357 360 } 358 361 } 362 $accountMeta->connect_xsact_id_meta($wp_userid, $xsact_user_id); 359 363 360 364 // If we are only checking premium, don't log the user in if they don't have premium … … 460 464 $raw = apply_filters('the_content', $post_object->post_content); 461 465 $blocks = parse_blocks( $raw ); 462 466 463 467 foreach ( $blocks as $block ) { 464 468 // Dont include preview content in premium output … … 472 476 473 477 } 474 478 475 479 if($button_controller->get_if_article_donation()) { 476 480 $result_content = $result_content . $button_controller->print_donation_button(); … … 650 654 $post_object = get_post($this->post_id); 651 655 $has_premium = $this->post_has_premium($transact, $post_object); 652 656 653 657 if(!$premium && $has_premium) { 654 658 $nonce_field = wp_nonce_field( 'transact_purchase_buttons', 'transact_purchase_buttons_nonce', true, false ); … … 661 665 $count_words = str_word_count(wp_strip_all_tags($content)); 662 666 } 663 667 664 668 if($button_controller->get_if_article_donation()) { 665 669 $content = $content . $button_controller->print_donation_button($count_words); … … 668 672 } 669 673 } 670 674 671 675 $content = '<div id="transact_content">' . $content . '</div>'; 672 676 } … … 863 867 return false; 864 868 } 865 return (isset($premium_from_meta) && $premium_from_meta !== '') || 869 return (isset($premium_from_meta) && $premium_from_meta !== '') || 866 870 ($post_object && strpos($post_object->post_content, 'transact/premium-content') > -1); 867 871 -
transact/trunk/readme.txt
r2348646 r2367448 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.4.2 8 Stable tag: 5.1. 38 Stable tag: 5.1.4 9 9 License: APACHE-2.0 10 10 License URI: https://www.apache.org/licenses/LICENSE-2.0 … … 82 82 83 83 84 = 5.1.4 = 85 * Check for already exising email registration. 86 84 87 = 5.1.3 = 85 88 * improve zero price checks -
transact/trunk/transact-plugin.php
r2348646 r2367448 3 3 * Plugin Name: transact.io 4 4 * Description: Integrates transact.io services into WP 5 * Version: 5.1. 35 * Version: 5.1.4 6 6 * Author: transact.io 7 7 * Author URI: https://transact.io
Note: See TracChangeset
for help on using the changeset viewer.