Plugin Directory

Changeset 1440657


Ignore:
Timestamp:
06/21/2016 06:21:13 AM (10 years ago)
Author:
inigoini
Message:

tagging 1.5.0

Location:
thecartpress/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • thecartpress/trunk/TheCartPress.class.php

    r1439870 r1440657  
    44Plugin URI: http://thecartpress.com
    55Description: Professional WordPress eCommerce Plugin. Use it as Shopping Cart, Catalog or Framework.
    6 Version: 1.5.0
     6Version: 1.5.1
    77Author: Pluginsmaker team
    88Author URI: http://pluginsmaker.com/
  • thecartpress/trunk/modules/CustomLogin.class.php

    r1439870 r1440657  
    4747        add_action( 'wp_logout'         , array( $this, 'redirect_after_logout' ) );
    4848
    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' ) );
    5151        //add_action( 'login_form_retrievepassword' , array( $this, 'redirect_to_custom_retrievepassword' ) );
    5252
    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' ) );
    5555
    5656        // 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 );
    6558
    6659        // 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 );
    7861
    7962        // Handlers for form posting actions
     
    8568        // Other customizations
    8669        // 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' ) );
    8871
    8972        // Changes Subject
     
    9174       
    9275        // 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') );
    9477
    9578        // Changes reset password content
     
    10689        add_shortcode( 'tcp-custom-password-lost-form'  , array( $this, 'render_password_lost_form' ) );
    10790        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';
    108120    }
    109121
  • thecartpress/trunk/readme.txt

    r1439870 r1440657  
    299299
    300300== Changelog ==
     301
     302= 1.5.1 =
     303* Fixed support for old PHP version
    301304
    302305= 1.5 =
Note: See TracChangeset for help on using the changeset viewer.