WordPress.org

Make WordPress Core

Ticket #1155: wp-register Patch.patch

File wp-register Patch.patch, 1.5 KB (added by denney, 9 years ago)

Patched WP-Register to support "template-based" register page.

  • C:/Documents

     
    5050        } 
    5151 
    5252        if ( 0 == count($errors) ) { 
    53  
     53                if (file_exists(TEMPLATEPATH . '/registercomplete.php')) { 
     54                        require(TEMPLATEPATH . '/registercomplete.php'); 
     55                } else { 
    5456        ?> 
    5557<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    5658<html xmlns="http://www.w3.org/1999/xhtml"> 
     
    7779</html> 
    7880 
    7981                <?php 
     82                } 
    8083                break; 
    8184        } 
    8285 
    8386default: 
    84  
     87        if (file_exists(TEMPLATEPATH . '/register.php')) { 
     88                require(TEMPLATEPATH . '/register.php'); 
     89        } else { 
    8590?> 
    8691<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    8792<html xmlns="http://www.w3.org/1999/xhtml"> 
     
    126131</body> 
    127132</html> 
    128133<?php 
    129  
     134        } 
    130135break; 
    131136 
    132137case 'disabled': 
    133  
     138        if (file_exists(TEMPLATEPATH . '/registerdisabled.php')) { 
     139                require(TEMPLATEPATH . '/registerdisabled.php'); 
     140        } else { 
    134141        ?> 
    135142<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    136143<html xmlns="http://www.w3.org/1999/xhtml"> 
     
    153160</html> 
    154161 
    155162        <?php 
     163        } 
    156164break; 
    157165 
    158166}