Plugin Directory

Changeset 749537


Ignore:
Timestamp:
08/01/2013 10:47:19 PM (13 years ago)
Author:
sreedoap
Message:

1.6.0f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pilotpress/trunk/pilotpress.php

    r741832 r749537  
    44Plugin URI: http://officeautopilot.com/
    55Description: OfficeAutoPilot / Ontraport WordPress integration plugin.
    6 Version: 1.6.0e
     6Version: 1.6.0f
    77Author: Ontraport Inc.
    88Author URI: http://officeautopilot.com/
     
    2121    class PilotPress {
    2222
    23         const VERSION = "1.6.0e";
     23        const VERSION = "1.6.0f";
    2424        const WP_MIN = "3.0.0";
    2525        const NSPACE = "_pilotpress_";
     
    676676                $customer = $this->get_setting("pilotpress_customer_plr");
    677677                if(!empty($customer) && $customer != "-1") {
    678                     $this->redirect(get_permalink($customer));
     678                    self::redirect(get_permalink($customer));
    679679                } else {
    680                     $this->redirect($this->homepage_url);
     680                    self::redirect($this->homepage_url);
    681681                }
    682682                die;
     
    13811381                           
    13821382                            unset($_SESSION["redirect_to"]);
    1383                             $this->redirect($redirect_to);
     1383                            self::redirect($redirect_to);
    13841384                            die;
    13851385                        }
     
    13891389                            $aff_plr = $this->get_setting("pilotpress_affiliate_plr");
    13901390                            if($aff_plr && $aff_plr != "-1") {
    1391                                 $this->redirect(get_permalink($aff_plr));
     1391                                self::redirect(get_permalink($aff_plr));
    13921392                                die;
    13931393                                exit;
    13941394                            } else {                               
    1395                                 $this->redirect(site_url());
     1395                                self::redirect(site_url());
    13961396                                die;
    13971397                            }
     
    14001400                            $cust_plr = $this->get_setting("pilotpress_customer_plr");                         
    14011401                            if($cust_plr && $cust_plr != "-1") {
    1402                                 $this->redirect(get_permalink($cust_plr));
     1402                                self::redirect(get_permalink($cust_plr));
    14031403                                die;
    14041404                            } else {
    1405                                 $this->redirect(site_url());
     1405                                self::redirect(site_url());
    14061406                                die;
    14071407                            }
     
    14181418            if(!empty($referrer) && !strstr($referrer, "wp-login") && !strstr($referrer, "wp-admin") ) {
    14191419                $_SESSION["loginFailed"] = true;
    1420                 $this->redirect($referrer);
     1420                self::redirect($referrer);
    14211421                die;
    14221422            }
     
    14341434            {
    14351435                /* notify user of e-mail, end the rest of WP's processing */
    1436                 $this->redirect(site_url() . "/wp-login.php?checkemail=confirm");
     1436                self::redirect(site_url() . "/wp-login.php?checkemail=confirm");
    14371437                die;
    14381438            }
     
    14561456                /* redirect the user to where they logged in from */
    14571457                if(isset($_SESSION["loginURL"]))
    1458                     $this->redirect($_SESSION["loginURL"]);
     1458                    self::redirect($_SESSION["loginURL"]);
    14591459                else
    1460                     $this->redirect(site_url());
     1460                    self::redirect(site_url());
    14611461            }
    14621462                   
     
    16081608                if(!empty($redirect)) {
    16091609                    if($redirect == "-1") {
    1610                         $this->redirect(site_url());
     1610                        self::redirect(site_url());
    16111611                    }
    16121612                    else if($redirect == "-2") {
     
    16141614                            $_SESSION["redirect_to"] = $id;
    16151615                        }
    1616                         $this->redirect(wp_login_url());
     1616                        self::redirect(wp_login_url());
    16171617                    }
    16181618                    else {
    1619                         $this->redirect(get_permalink($redirect));
     1619                        self::redirect(get_permalink($redirect));
    16201620                    }
    16211621
    16221622                } else {
    1623                     $this->redirect($this->homepage_url);
     1623                    self::redirect($this->homepage_url);
    16241624                }
    16251625            }
     
    18341834                        $page_id = $wpdb->get_var("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_pilotpress_system_page' AND meta_value = 'customer_center'", ARRAY_A);
    18351835                        if($page_id) {
    1836                             $this->redirect(get_permalink($page_id));
     1836                            self::redirect(get_permalink($page_id));
    18371837                            die;
    18381838                        }
     
    18411841                        $page_id = $wpdb->get_var("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_pilotpress_system_page' AND meta_value = 'affiliate_center'", ARRAY_A);
    18421842                        if($page_id) {
    1843                             $this->redirect(get_permalink($page_id));
     1843                            self::redirect(get_permalink($page_id));
    18441844                            die;
    18451845                        }
     
    20972097        }
    20982098
    2099         public function redirect($url) {
     2099        public static function redirect($url) {
    21002100            // Workaround for trac bug #21602
    21012101            $current_url = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
Note: See TracChangeset for help on using the changeset viewer.