Changeset 1440657
- Timestamp:
- 06/21/2016 06:21:13 AM (10 years ago)
- Location:
- thecartpress/trunk
- Files:
-
- 3 edited
-
TheCartPress.class.php (modified) (1 diff)
-
modules/CustomLogin.class.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
thecartpress/trunk/TheCartPress.class.php
r1439870 r1440657 4 4 Plugin URI: http://thecartpress.com 5 5 Description: Professional WordPress eCommerce Plugin. Use it as Shopping Cart, Catalog or Framework. 6 Version: 1.5. 06 Version: 1.5.1 7 7 Author: Pluginsmaker team 8 8 Author URI: http://pluginsmaker.com/ -
thecartpress/trunk/modules/CustomLogin.class.php
r1439870 r1440657 47 47 add_action( 'wp_logout' , array( $this, 'redirect_after_logout' ) ); 48 48 49 add_action( 'login_form_register' , array( $this, 'redirect_to_custom_register' ) );50 add_action( 'login_form_lostpassword' , array( $this, 'redirect_to_custom_lostpassword' ) );49 add_action( 'login_form_register' , array( $this, 'redirect_to_custom_register' ) ); 50 add_action( 'login_form_lostpassword' , array( $this, 'redirect_to_custom_lostpassword' ) ); 51 51 //add_action( 'login_form_retrievepassword' , array( $this, 'redirect_to_custom_retrievepassword' ) ); 52 52 53 add_action( 'login_form_rp' , array( $this, 'redirect_to_custom_password_reset' ) );54 add_action( 'login_form_resetpass' , array( $this, 'redirect_to_custom_password_reset' ) );53 add_action( 'login_form_rp' , array( $this, 'redirect_to_custom_password_reset' ) ); 54 add_action( 'login_form_resetpass' , array( $this, 'redirect_to_custom_password_reset' ) ); 55 55 56 56 // fixes "Lost Password?" URLs on login page 57 add_filter( 'lostpassword_url', function ( $url, $redirect ) { 58 $args = array( 'action' => 'lostpassword' ); 59 60 if ( !empty( $redirect ) ) { 61 $args['redirect_to'] = $redirect; 62 } 63 return add_query_arg( $args, site_url('wp-login.php') ); 64 }, 10, 2 ); 57 add_filter( 'lostpassword_url', array( $this, 'lostpassword_url' ) , 10, 2 ); 65 58 66 59 // fixes other password reset related urls 67 add_filter( 'network_site_url', function( $url, $path, $scheme ) { 68 69 if ( stripos( $url, 'action=lostpassword') !== false ) { 70 return site_url( 'wp-login.php?action=lostpassword', $scheme ); 71 } 72 if ( stripos( $url, "action=resetpass" ) !== false ) { 73 return site_url('wp-login.php?action=resetpass', $scheme ); 74 } 75 76 return $url; 77 }, 10, 3 ); 60 add_filter( 'network_site_url', array( $this, 'network_site_url' ), 10, 3 ); 78 61 79 62 // Handlers for form posting actions … … 85 68 // Other customizations 86 69 // Changes "From" email name 87 add_filter( 'wp_mail_from_name', function( $name ) { return get_bloginfo( 'name' ); });70 add_filter( 'wp_mail_from_name', array( $this, 'wp_mail_from_name' ) ); 88 71 89 72 // Changes Subject … … 91 74 92 75 // Change email type to HTML 93 add_filter( 'wp_mail_content_type', function( $content_type ) { return 'text/html'; });76 add_filter( 'wp_mail_content_type', array( $this, 'wp_mail_content_type') ); 94 77 95 78 // Changes reset password content … … 106 89 add_shortcode( 'tcp-custom-password-lost-form' , array( $this, 'render_password_lost_form' ) ); 107 90 add_shortcode( 'tcp-custom-password-reset-form' , array( $this, 'render_password_reset_form' ) ); 91 } 92 93 public function lostpassword_url( $url, $redirect ) { 94 $args = array( 'action' => 'lostpassword' ); 95 96 if ( !empty( $redirect ) ) { 97 $args['redirect_to'] = $redirect; 98 } 99 return add_query_arg( $args, site_url('wp-login.php') ); 100 } 101 102 public function network_site_url( $url, $path, $scheme ) { 103 104 if ( stripos( $url, 'action=lostpassword') !== false ) { 105 return site_url( 'wp-login.php?action=lostpassword', $scheme ); 106 } 107 if ( stripos( $url, "action=resetpass" ) !== false ) { 108 return site_url('wp-login.php?action=resetpass', $scheme ); 109 } 110 111 return $url; 112 } 113 114 public function wp_mail_from_name( $name ) { 115 return get_bloginfo( 'name' ); 116 } 117 118 public function wp_mail_content_type( $content_type ) { 119 return 'text/html'; 108 120 } 109 121 -
thecartpress/trunk/readme.txt
r1439870 r1440657 299 299 300 300 == Changelog == 301 302 = 1.5.1 = 303 * Fixed support for old PHP version 301 304 302 305 = 1.5 =
Note: See TracChangeset
for help on using the changeset viewer.