Merge pull request #2049 from krbvroc1/lost_pass_fixes

Lost password fixes
This commit is contained in:
Mike Jolley 2012-12-27 10:03:11 -08:00
commit 1411cacc58
3 changed files with 13 additions and 3 deletions

View File

@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
<p><?php _e( 'If this was a mistake, just ignore this email and nothing will happen.', 'woocommerce' ); ?></p>
<p><?php _e( 'To reset your password, visit the following address:', 'woocommerce' ); ?></p>
<p>
<a href="<?php echo esc_url( get_permalink( woocommerce_get_page_id( 'lost_password' ) ) . sprintf( '?key=%s&login=%s', $reset_key, $user_login ) ); ?>">
<a href="<?php echo esc_url( add_query_arg( array( 'key' => $reset_key, 'login' => rawurlencode( $user_login ) ), get_permalink( woocommerce_get_page_id( 'lost_password' ) ) ) ); ?>">
<?php _e( 'Click here to reset your password', 'woocommerce' ); ?></a>
</p>
<p></p>

View File

@ -388,7 +388,7 @@ if ( ! function_exists( 'is_account_page' ) ) {
* @return bool
*/
function is_account_page() {
return ( is_page( woocommerce_get_page_id( 'myaccount' ) ) || is_page( woocommerce_get_page_id( 'edit_address' ) ) || is_page( woocommerce_get_page_id( 'view_order' ) ) || is_page( woocommerce_get_page_id( 'change_password' ) ) ) ? true : false;
return ( is_page( woocommerce_get_page_id( 'myaccount' ) ) || is_page( woocommerce_get_page_id( 'edit_address' ) ) || is_page( woocommerce_get_page_id( 'view_order' ) ) || is_page( woocommerce_get_page_id( 'change_password' ) || is_page( woocommerce_get_page_id( 'lost_password' ) ) ) ) ? true : false;
}
}
if ( ! function_exists( 'is_order_received_page' ) ) {

View File

@ -325,4 +325,14 @@ add_filter( 'woocommerce_short_description', 'convert_chars' );
add_filter( 'woocommerce_short_description', 'wpautop' );
add_filter( 'woocommerce_short_description', 'shortcode_unautop' );
add_filter( 'woocommerce_short_description', 'prepend_attachment' );
add_filter( 'woocommerce_short_description', 'do_shortcode', 11 ); // AFTER wpautop()
add_filter( 'woocommerce_short_description', 'do_shortcode', 11 ); // AFTER wpautop()
function woocommerce_lostpassword_url( $url ) {
$id = woocommerce_get_page_id( 'lost_password' );
if ($id != -1) $url = get_permalink( $id );
return $url;
}
add_filter('lostpassword_url', 'woocommerce_lostpassword_url');