Make WordPress Core

Ticket #16302: 16302.diff

File 16302.diff, 51.3 KB (added by c3mdigital, 14 years ago)
  • wp-admin/admin.php

     
    1212 * @since 2.3.2
    1313 */
    1414if ( ! defined('WP_ADMIN') )
    15         define('WP_ADMIN', TRUE);
     15        define('WP_ADMIN', true);
    1616
    1717if ( ! defined('WP_NETWORK_ADMIN') )
    18         define('WP_NETWORK_ADMIN', FALSE);
     18        define('WP_NETWORK_ADMIN', false);
    1919
    2020if ( ! defined('WP_USER_ADMIN') )
    21         define('WP_USER_ADMIN', FALSE);
     21        define('WP_USER_ADMIN', false);
    2222
    2323if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) {
    24         define('WP_BLOG_ADMIN', TRUE);
     24        define('WP_BLOG_ADMIN', true);
    2525}
    2626
    2727if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') )
  • wp-admin/includes/class-ftp-pure.php

     
    2727 */
    2828class ftp extends ftp_base {
    2929
    30         function ftp($verb=FALSE, $le=FALSE) {
     30        function ftp($verb=false, $le=false) {
    3131                $this->__construct($verb, $le);
    3232        }
    3333
    34         function __construct($verb=FALSE, $le=FALSE) {
     34        function __construct($verb=false, $le=false) {
    3535                parent::__construct(false, $verb, $le);
    3636        }
    3737
     
    4343                if(!@stream_set_timeout($sock, $this->_timeout)) {
    4444                        $this->PushError('_settimeout','socket set send timeout');
    4545                        $this->_quit();
    46                         return FALSE;
     46                        return false;
    4747                }
    48                 return TRUE;
     48                return true;
    4949        }
    5050
    5151        function _connect($host, $port) {
     
    5353                $sock = @fsockopen($host, $port, $errno, $errstr, $this->_timeout);
    5454                if (!$sock) {
    5555                        $this->PushError('_connect','socket connect failed', $errstr." (".$errno.")");
    56                         return FALSE;
     56                        return false;
    5757                }
    5858                $this->_connected=true;
    5959                return $sock;
     
    6262        function _readmsg($fnction="_readmsg"){
    6363                if(!$this->_connected) {
    6464                        $this->PushError($fnction, 'Connect first');
    65                         return FALSE;
     65                        return false;
    6666                }
    6767                $result=true;
    6868                $this->_message="";
     
    8686        function _exec($cmd, $fnction="_exec") {
    8787                if(!$this->_ready) {
    8888                        $this->PushError($fnction,'Connect first');
    89                         return FALSE;
     89                        return false;
    9090                }
    9191                if($this->LocalEcho) echo "PUT > ",$cmd,CRLF;
    9292                $status=@fputs($this->_ftp_control_sock, $cmd.CRLF);
    9393                if($status===false) {
    9494                        $this->PushError($fnction,'socket write failed');
    95                         return FALSE;
     95                        return false;
    9696                }
    9797                $this->_lastaction=time();
    98                 if(!$this->_readmsg($fnction)) return FALSE;
    99                 return TRUE;
     98                if(!$this->_readmsg($fnction)) return false;
     99                return true;
    100100        }
    101101
    102102        function _data_prepare($mode=FTP_ASCII) {
    103                 if(!$this->_settype($mode)) return FALSE;
     103                if(!$this->_settype($mode)) return false;
    104104                if($this->_passive) {
    105105                        if(!$this->_exec("PASV", "pasv")) {
    106106                                $this->_data_close();
    107                                 return FALSE;
     107                                return false;
    108108                        }
    109109                        if(!$this->_checkCode()) {
    110110                                $this->_data_close();
    111                                 return FALSE;
     111                                return false;
    112112                        }
    113113                        $ip_port = explode(",", ereg_replace("^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$", "\\1", $this->_message));
    114114                        $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3];
     
    118118                        if(!$this->_ftp_data_sock) {
    119119                                $this->PushError("_data_prepare","fsockopen fails", $errstr." (".$errno.")");
    120120                                $this->_data_close();
    121                                 return FALSE;
     121                                return false;
    122122                        }
    123123                        else $this->_ftp_data_sock;
    124124                } else {
    125125                        $this->SendMSG("Only passive connections available!");
    126                         return FALSE;
     126                        return false;
    127127                }
    128                 return TRUE;
     128                return true;
    129129        }
    130130
    131131        function _data_read($mode=FTP_ASCII, $fp=NULL) {
     
    133133                else $out="";
    134134                if(!$this->_passive) {
    135135                        $this->SendMSG("Only passive connections available!");
    136                         return FALSE;
     136                        return false;
    137137                }
    138138                while (!feof($this->_ftp_data_sock)) {
    139139                        $block=fread($this->_ftp_data_sock, $this->_ftp_buff_size);
     
    149149                else $out="";
    150150                if(!$this->_passive) {
    151151                        $this->SendMSG("Only passive connections available!");
    152                         return FALSE;
     152                        return false;
    153153                }
    154154                if(is_resource($fp)) {
    155155                        while(!feof($fp)) {
     
    157157                                if(!$this->_data_write_block($mode, $block)) return false;
    158158                        }
    159159                } elseif(!$this->_data_write_block($mode, $fp)) return false;
    160                 return TRUE;
     160                return true;
    161161        }
    162162
    163163        function _data_write_block($mode, $block) {
    164164                if($mode!=FTP_BINARY) $block=preg_replace("/\r\n|\r|\n/", $this->_eol_code[$this->OS_remote], $block);
    165165                do {
    166                         if(($t=@fwrite($this->_ftp_data_sock, $block))===FALSE) {
     166                        if(($t=@fwrite($this->_ftp_data_sock, $block))===false) {
    167167                                $this->PushError("_data_write","Can't write to socket");
    168                                 return FALSE;
     168                                return false;
    169169                        }
    170170                        $block=substr($block, $t);
    171171                } while(!empty($block));
     
    175175        function _data_close() {
    176176                @fclose($this->_ftp_data_sock);
    177177                $this->SendMSG("Disconnected data from remote host");
    178                 return TRUE;
     178                return true;
    179179        }
    180180
    181         function _quit($force=FALSE) {
     181        function _quit($force=false) {
    182182                if($this->_connected or $force) {
    183183                        @fclose($this->_ftp_control_sock);
    184184                        $this->_connected=false;
  • wp-admin/includes/class-ftp-sockets.php

     
    2727 */
    2828class ftp extends ftp_base {
    2929
    30         function ftp($verb=FALSE, $le=FALSE) {
     30        function ftp($verb=false, $le=false) {
    3131                $this->__construct($verb, $le);
    3232        }
    3333
    34         function __construct($verb=FALSE, $le=FALSE) {
     34        function __construct($verb=false, $le=false) {
    3535                parent::__construct(true, $verb, $le);
    3636        }
    3737
     
    4343                if(!@socket_set_option($sock, SOL_SOCKET, SO_RCVTIMEO, array("sec"=>$this->_timeout, "usec"=>0))) {
    4444                        $this->PushError('_connect','socket set receive timeout',socket_strerror(socket_last_error($sock)));
    4545                        @socket_close($sock);
    46                         return FALSE;
     46                        return false;
    4747                }
    4848                if(!@socket_set_option($sock, SOL_SOCKET , SO_SNDTIMEO, array("sec"=>$this->_timeout, "usec"=>0))) {
    4949                        $this->PushError('_connect','socket set send timeout',socket_strerror(socket_last_error($sock)));
    5050                        @socket_close($sock);
    51                         return FALSE;
     51                        return false;
    5252                }
    5353                return true;
    5454        }
     
    5757                $this->SendMSG("Creating socket");
    5858                if(!($sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) {
    5959                        $this->PushError('_connect','socket create failed',socket_strerror(socket_last_error($sock)));
    60                         return FALSE;
     60                        return false;
    6161                }
    62                 if(!$this->_settimeout($sock)) return FALSE;
     62                if(!$this->_settimeout($sock)) return false;
    6363                $this->SendMSG("Connecting to \"".$host.":".$port."\"");
    6464                if (!($res = @socket_connect($sock, $host, $port))) {
    6565                        $this->PushError('_connect','socket connect failed',socket_strerror(socket_last_error($sock)));
    6666                        @socket_close($sock);
    67                         return FALSE;
     67                        return false;
    6868                }
    6969                $this->_connected=true;
    7070                return $sock;
     
    7373        function _readmsg($fnction="_readmsg"){
    7474                if(!$this->_connected) {
    7575                        $this->PushError($fnction,'Connect first');
    76                         return FALSE;
     76                        return false;
    7777                }
    7878                $result=true;
    7979                $this->_message="";
     
    9797        function _exec($cmd, $fnction="_exec") {
    9898                if(!$this->_ready) {
    9999                        $this->PushError($fnction,'Connect first');
    100                         return FALSE;
     100                        return false;
    101101                }
    102102                if($this->LocalEcho) echo "PUT > ",$cmd,CRLF;
    103103                $status=@socket_write($this->_ftp_control_sock, $cmd.CRLF);
    104104                if($status===false) {
    105105                        $this->PushError($fnction,'socket write failed', socket_strerror(socket_last_error($this->stream)));
    106                         return FALSE;
     106                        return false;
    107107                }
    108108                $this->_lastaction=time();
    109                 if(!$this->_readmsg($fnction)) return FALSE;
    110                 return TRUE;
     109                if(!$this->_readmsg($fnction)) return false;
     110                return true;
    111111        }
    112112
    113113        function _data_prepare($mode=FTP_ASCII) {
    114                 if(!$this->_settype($mode)) return FALSE;
     114                if(!$this->_settype($mode)) return false;
    115115                $this->SendMSG("Creating data socket");
    116116                $this->_ftp_data_sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
    117117                if ($this->_ftp_data_sock < 0) {
    118118                        $this->PushError('_data_prepare','socket create failed',socket_strerror(socket_last_error($this->_ftp_data_sock)));
    119                         return FALSE;
     119                        return false;
    120120                }
    121121                if(!$this->_settimeout($this->_ftp_data_sock)) {
    122122                        $this->_data_close();
    123                         return FALSE;
     123                        return false;
    124124                }
    125125                if($this->_passive) {
    126126                        if(!$this->_exec("PASV", "pasv")) {
    127127                                $this->_data_close();
    128                                 return FALSE;
     128                                return false;
    129129                        }
    130130                        if(!$this->_checkCode()) {
    131131                                $this->_data_close();
    132                                 return FALSE;
     132                                return false;
    133133                        }
    134134                        $ip_port = explode(",", ereg_replace("^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$", "\\1", $this->_message));
    135135                        $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3];
     
    138138                        if(!@socket_connect($this->_ftp_data_sock, $this->_datahost, $this->_dataport)) {
    139139                                $this->PushError("_data_prepare","socket_connect", socket_strerror(socket_last_error($this->_ftp_data_sock)));
    140140                                $this->_data_close();
    141                                 return FALSE;
     141                                return false;
    142142                        }
    143143                        else $this->_ftp_temp_sock=$this->_ftp_data_sock;
    144144                } else {
    145145                        if(!@socket_getsockname($this->_ftp_control_sock, $addr, $port)) {
    146146                                $this->PushError("_data_prepare","can't get control socket information", socket_strerror(socket_last_error($this->_ftp_control_sock)));
    147147                                $this->_data_close();
    148                                 return FALSE;
     148                                return false;
    149149                        }
    150150                        if(!@socket_bind($this->_ftp_data_sock,$addr)){
    151151                                $this->PushError("_data_prepare","can't bind data socket", socket_strerror(socket_last_error($this->_ftp_data_sock)));
    152152                                $this->_data_close();
    153                                 return FALSE;
     153                                return false;
    154154                        }
    155155                        if(!@socket_listen($this->_ftp_data_sock)) {
    156156                                $this->PushError("_data_prepare","can't listen data socket", socket_strerror(socket_last_error($this->_ftp_data_sock)));
    157157                                $this->_data_close();
    158                                 return FALSE;
     158                                return false;
    159159                        }
    160160                        if(!@socket_getsockname($this->_ftp_data_sock, $this->_datahost, $this->_dataport)) {
    161161                                $this->PushError("_data_prepare","can't get data socket information", socket_strerror(socket_last_error($this->_ftp_data_sock)));
    162162                                $this->_data_close();
    163                                 return FALSE;
     163                                return false;
    164164                        }
    165165                        if(!$this->_exec('PORT '.str_replace('.',',',$this->_datahost.'.'.($this->_dataport>>8).'.'.($this->_dataport&0x00FF)), "_port")) {
    166166                                $this->_data_close();
    167                                 return FALSE;
     167                                return false;
    168168                        }
    169169                        if(!$this->_checkCode()) {
    170170                                $this->_data_close();
    171                                 return FALSE;
     171                                return false;
    172172                        }
    173173                }
    174                 return TRUE;
     174                return true;
    175175        }
    176176
    177177        function _data_read($mode=FTP_ASCII, $fp=NULL) {
     
    181181                if(!$this->_passive) {
    182182                        $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport);
    183183                        $this->_ftp_temp_sock=socket_accept($this->_ftp_data_sock);
    184                         if($this->_ftp_temp_sock===FALSE) {
     184                        if($this->_ftp_temp_sock===false) {
    185185                                $this->PushError("_data_read","socket_accept", socket_strerror(socket_last_error($this->_ftp_temp_sock)));
    186186                                $this->_data_close();
    187                                 return FALSE;
     187                                return false;
    188188                        }
    189189                }
    190190
     
    204204                if(!$this->_passive) {
    205205                        $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport);
    206206                        $this->_ftp_temp_sock=socket_accept($this->_ftp_data_sock);
    207                         if($this->_ftp_temp_sock===FALSE) {
     207                        if($this->_ftp_temp_sock===false) {
    208208                                $this->PushError("_data_write","socket_accept", socket_strerror(socket_last_error($this->_ftp_temp_sock)));
    209209                                $this->_data_close();
    210210                                return false;
     
    222222        function _data_write_block($mode, $block) {
    223223                if($mode!=FTP_BINARY) $block=preg_replace("/\r\n|\r|\n/", $this->_eol_code[$this->OS_remote], $block);
    224224                do {
    225                         if(($t=@socket_write($this->_ftp_temp_sock, $block))===FALSE) {
     225                        if(($t=@socket_write($this->_ftp_temp_sock, $block))===false) {
    226226                                $this->PushError("_data_write","socket_write", socket_strerror(socket_last_error($this->_ftp_temp_sock)));
    227227                                $this->_data_close();
    228                                 return FALSE;
     228                                return false;
    229229                        }
    230230                        $block=substr($block, $t);
    231231                } while(!empty($block));
     
    236236                @socket_close($this->_ftp_temp_sock);
    237237                @socket_close($this->_ftp_data_sock);
    238238                $this->SendMSG("Disconnected data from remote host");
    239                 return TRUE;
     239                return true;
    240240        }
    241241
    242242        function _quit() {
  • wp-admin/includes/class-ftp.php

     
    121121        var $AutoAsciiExt;
    122122
    123123        /* Constructor */
    124         function ftp_base($port_mode=FALSE) {
     124        function ftp_base($port_mode=false) {
    125125                $this->__construct($port_mode);
    126126        }
    127127
    128         function __construct($port_mode=FALSE, $verb=FALSE, $le=FALSE) {
     128        function __construct($port_mode=false, $verb=false, $le=false) {
    129129                $this->LocalEcho=$le;
    130130                $this->Verbose=$verb;
    131131                $this->_lastaction=NULL;
     
    134134                $this->AuthorizedTransferMode=array(FTP_AUTOASCII, FTP_ASCII, FTP_BINARY);
    135135                $this->OS_FullName=array(FTP_OS_Unix => 'UNIX', FTP_OS_Windows => 'WINDOWS', FTP_OS_Mac => 'MACOS');
    136136                $this->AutoAsciiExt=array("ASP","BAT","C","CPP","CSS","CSV","JS","H","HTM","HTML","SHTML","INI","LOG","PHP3","PHTML","PL","PERL","SH","SQL","TXT");
    137                 $this->_port_available=($port_mode==TRUE);
     137                $this->_port_available=($port_mode==true);
    138138                $this->SendMSG("Staring FTP client class".($this->_port_available?"":" without PORT mode support"));
    139                 $this->_connected=FALSE;
    140                 $this->_ready=FALSE;
    141                 $this->_can_restore=FALSE;
     139                $this->_connected=false;
     140                $this->_ready=false;
     141                $this->_can_restore=false;
    142142                $this->_code=0;
    143143                $this->_message="";
    144144                $this->_ftp_buff_size=4096;
     
    228228                        echo $message.($crlf?CRLF:"");
    229229                        flush();
    230230                }
    231                 return TRUE;
     231                return true;
    232232        }
    233233
    234234        function SetType($mode=FTP_AUTOASCII) {
    235235                if(!in_array($mode, $this->AuthorizedTransferMode)) {
    236236                        $this->SendMSG("Wrong type");
    237                         return FALSE;
     237                        return false;
    238238                }
    239239                $this->_type=$mode;
    240240                $this->SendMSG("Transfer type: ".($this->_type==FTP_BINARY?"binary":($this->_type==FTP_ASCII?"ASCII":"auto ASCII") ) );
    241                 return TRUE;
     241                return true;
    242242        }
    243243
    244244        function _settype($mode=FTP_ASCII) {
    245245                if($this->_ready) {
    246246                        if($mode==FTP_BINARY) {
    247247                                if($this->_curtype!=FTP_BINARY) {
    248                                         if(!$this->_exec("TYPE I", "SetType")) return FALSE;
     248                                        if(!$this->_exec("TYPE I", "SetType")) return false;
    249249                                        $this->_curtype=FTP_BINARY;
    250250                                }
    251251                        } elseif($this->_curtype!=FTP_ASCII) {
    252                                 if(!$this->_exec("TYPE A", "SetType")) return FALSE;
     252                                if(!$this->_exec("TYPE A", "SetType")) return false;
    253253                                $this->_curtype=FTP_ASCII;
    254254                        }
    255                 } else return FALSE;
    256                 return TRUE;
     255                } else return false;
     256                return true;
    257257        }
    258258
    259259        function Passive($pasv=NULL) {
     
    261261                else $this->_passive=$pasv;
    262262                if(!$this->_port_available and !$this->_passive) {
    263263                        $this->SendMSG("Only passive connections available!");
    264                         $this->_passive=TRUE;
    265                         return FALSE;
     264                        $this->_passive=true;
     265                        return false;
    266266                }
    267267                $this->SendMSG("Passive mode ".($this->_passive?"on":"off"));
    268                 return TRUE;
     268                return true;
    269269        }
    270270
    271271        function SetServer($host, $port=21, $reconnect=true) {
    272272                if(!is_long($port)) {
    273273                $this->verbose=true;
    274274            $this->SendMSG("Incorrect port syntax");
    275                         return FALSE;
     275                        return false;
    276276                } else {
    277277                        $ip=@gethostbyname($host);
    278278                $dns=@gethostbyaddr($host);
     
    283283                $ipaslong = ip2long($ip);
    284284                        if ( ($ipaslong == false) || ($ipaslong === -1) ) {
    285285                                $this->SendMSG("Wrong host name/address \"".$host."\"");
    286                                 return FALSE;
     286                                return false;
    287287                        }
    288288                $this->_host=$ip;
    289289                $this->_fullhost=$dns;
     
    294294                if($reconnect){
    295295                        if($this->_connected) {
    296296                                $this->SendMSG("Reconnecting");
    297                                 if(!$this->quit(FTP_FORCE)) return FALSE;
    298                                 if(!$this->connect()) return FALSE;
     297                                if(!$this->quit(FTP_FORCE)) return false;
     298                                if(!$this->connect()) return false;
    299299                        }
    300300                }
    301                 return TRUE;
     301                return true;
    302302        }
    303303
    304304        function SetUmask($umask=0022) {
    305305                $this->_umask=$umask;
    306306                umask($this->_umask);
    307307                $this->SendMSG("UMASK 0".decoct($this->_umask));
    308                 return TRUE;
     308                return true;
    309309        }
    310310
    311311        function SetTimeout($timeout=30) {
    312312                $this->_timeout=$timeout;
    313313                $this->SendMSG("Timeout ".$this->_timeout);
    314314                if($this->_connected)
    315                         if(!$this->_settimeout($this->_ftp_control_sock)) return FALSE;
    316                 return TRUE;
     315                        if(!$this->_settimeout($this->_ftp_control_sock)) return false;
     316                return true;
    317317        }
    318318
    319319        function connect($server=NULL) {
     
    324324            $this->SendMsg('Local OS : '.$this->OS_FullName[$this->OS_local]);
    325325                if(!($this->_ftp_control_sock = $this->_connect($this->_host, $this->_port))) {
    326326                        $this->SendMSG("Error : Cannot connect to remote host \"".$this->_fullhost." :".$this->_port."\"");
    327                         return FALSE;
     327                        return false;
    328328                }
    329329                $this->SendMSG("Connected to remote host \"".$this->_fullhost.":".$this->_port."\". Waiting for greeting.");
    330330                do {
    331                         if(!$this->_readmsg()) return FALSE;
    332                         if(!$this->_checkCode()) return FALSE;
     331                        if(!$this->_readmsg()) return false;
     332                        if(!$this->_checkCode()) return false;
    333333                        $this->_lastaction=time();
    334334                } while($this->_code<200);
    335335                $this->_ready=true;
     
    344344                }
    345345                if(!$this->features()) $this->SendMSG("Can't get features list. All supported - disabled");
    346346                else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features)));
    347                 return TRUE;
     347                return true;
    348348        }
    349349
    350350        function quit($force=false) {
    351351                if($this->_ready) {
    352                         if(!$this->_exec("QUIT") and !$force) return FALSE;
    353                         if(!$this->_checkCode() and !$force) return FALSE;
     352                        if(!$this->_exec("QUIT") and !$force) return false;
     353                        if(!$this->_checkCode() and !$force) return false;
    354354                        $this->_ready=false;
    355355                        $this->SendMSG("Session finished");
    356356                }
    357357                $this->_quit();
    358                 return TRUE;
     358                return true;
    359359        }
    360360
    361361        function login($user=NULL, $pass=NULL) {
     
    363363                else $this->_login="anonymous";
    364364                if(!is_null($pass)) $this->_password=$pass;
    365365                else $this->_password="anon@anon.com";
    366                 if(!$this->_exec("USER ".$this->_login, "login")) return FALSE;
    367                 if(!$this->_checkCode()) return FALSE;
     366                if(!$this->_exec("USER ".$this->_login, "login")) return false;
     367                if(!$this->_checkCode()) return false;
    368368                if($this->_code!=230) {
    369                         if(!$this->_exec((($this->_code==331)?"PASS ":"ACCT ").$this->_password, "login")) return FALSE;
    370                         if(!$this->_checkCode()) return FALSE;
     369                        if(!$this->_exec((($this->_code==331)?"PASS ":"ACCT ").$this->_password, "login")) return false;
     370                        if(!$this->_checkCode()) return false;
    371371                }
    372372                $this->SendMSG("Authentication succeeded");
    373373                if(empty($this->_features)) {
    374374                        if(!$this->features()) $this->SendMSG("Can't get features list. All supported - disabled");
    375375                        else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features)));
    376376                }
    377                 return TRUE;
     377                return true;
    378378        }
    379379
    380380        function pwd() {
    381                 if(!$this->_exec("PWD", "pwd")) return FALSE;
    382                 if(!$this->_checkCode()) return FALSE;
     381                if(!$this->_exec("PWD", "pwd")) return false;
     382                if(!$this->_checkCode()) return false;
    383383                return ereg_replace("^[0-9]{3} \"(.+)\".+", "\\1", $this->_message);
    384384        }
    385385
    386386        function cdup() {
    387                 if(!$this->_exec("CDUP", "cdup")) return FALSE;
    388                 if(!$this->_checkCode()) return FALSE;
     387                if(!$this->_exec("CDUP", "cdup")) return false;
     388                if(!$this->_checkCode()) return false;
    389389                return true;
    390390        }
    391391
    392392        function chdir($pathname) {
    393                 if(!$this->_exec("CWD ".$pathname, "chdir")) return FALSE;
    394                 if(!$this->_checkCode()) return FALSE;
    395                 return TRUE;
     393                if(!$this->_exec("CWD ".$pathname, "chdir")) return false;
     394                if(!$this->_checkCode()) return false;
     395                return true;
    396396        }
    397397
    398398        function rmdir($pathname) {
    399                 if(!$this->_exec("RMD ".$pathname, "rmdir")) return FALSE;
    400                 if(!$this->_checkCode()) return FALSE;
    401                 return TRUE;
     399                if(!$this->_exec("RMD ".$pathname, "rmdir")) return false;
     400                if(!$this->_checkCode()) return false;
     401                return true;
    402402        }
    403403
    404404        function mkdir($pathname) {
    405                 if(!$this->_exec("MKD ".$pathname, "mkdir")) return FALSE;
    406                 if(!$this->_checkCode()) return FALSE;
    407                 return TRUE;
     405                if(!$this->_exec("MKD ".$pathname, "mkdir")) return false;
     406                if(!$this->_checkCode()) return false;
     407                return true;
    408408        }
    409409
    410410        function rename($from, $to) {
    411                 if(!$this->_exec("RNFR ".$from, "rename")) return FALSE;
    412                 if(!$this->_checkCode()) return FALSE;
     411                if(!$this->_exec("RNFR ".$from, "rename")) return false;
     412                if(!$this->_checkCode()) return false;
    413413                if($this->_code==350) {
    414                         if(!$this->_exec("RNTO ".$to, "rename")) return FALSE;
    415                         if(!$this->_checkCode()) return FALSE;
    416                 } else return FALSE;
    417                 return TRUE;
     414                        if(!$this->_exec("RNTO ".$to, "rename")) return false;
     415                        if(!$this->_checkCode()) return false;
     416                } else return false;
     417                return true;
    418418        }
    419419
    420420        function filesize($pathname) {
    421421                if(!isset($this->_features["SIZE"])) {
    422422                        $this->PushError("filesize", "not supported by server");
    423                         return FALSE;
     423                        return false;
    424424                }
    425                 if(!$this->_exec("SIZE ".$pathname, "filesize")) return FALSE;
    426                 if(!$this->_checkCode()) return FALSE;
     425                if(!$this->_exec("SIZE ".$pathname, "filesize")) return false;
     426                if(!$this->_checkCode()) return false;
    427427                return ereg_replace("^[0-9]{3} ([0-9]+)".CRLF, "\\1", $this->_message);
    428428        }
    429429
    430430        function abort() {
    431                 if(!$this->_exec("ABOR", "abort")) return FALSE;
     431                if(!$this->_exec("ABOR", "abort")) return false;
    432432                if(!$this->_checkCode()) {
    433                         if($this->_code!=426) return FALSE;
    434                         if(!$this->_readmsg("abort")) return FALSE;
    435                         if(!$this->_checkCode()) return FALSE;
     433                        if($this->_code!=426) return false;
     434                        if(!$this->_readmsg("abort")) return false;
     435                        if(!$this->_checkCode()) return false;
    436436                }
    437437                return true;
    438438        }
     
    440440        function mdtm($pathname) {
    441441                if(!isset($this->_features["MDTM"])) {
    442442                        $this->PushError("mdtm", "not supported by server");
    443                         return FALSE;
     443                        return false;
    444444                }
    445                 if(!$this->_exec("MDTM ".$pathname, "mdtm")) return FALSE;
    446                 if(!$this->_checkCode()) return FALSE;
     445                if(!$this->_exec("MDTM ".$pathname, "mdtm")) return false;
     446                if(!$this->_checkCode()) return false;
    447447                $mdtm = ereg_replace("^[0-9]{3} ([0-9]+)".CRLF, "\\1", $this->_message);
    448448                $date = sscanf($mdtm, "%4d%2d%2d%2d%2d%2d");
    449449                $timestamp = mktime($date[3], $date[4], $date[5], $date[1], $date[2], $date[0]);
     
    451451        }
    452452
    453453        function systype() {
    454                 if(!$this->_exec("SYST", "systype")) return FALSE;
    455                 if(!$this->_checkCode()) return FALSE;
     454                if(!$this->_exec("SYST", "systype")) return false;
     455                if(!$this->_checkCode()) return false;
    456456                $DATA = explode(" ", $this->_message);
    457457                return array($DATA[1], $DATA[3]);
    458458        }
    459459
    460460        function delete($pathname) {
    461                 if(!$this->_exec("DELE ".$pathname, "delete")) return FALSE;
    462                 if(!$this->_checkCode()) return FALSE;
    463                 return TRUE;
     461                if(!$this->_exec("DELE ".$pathname, "delete")) return false;
     462                if(!$this->_checkCode()) return false;
     463                return true;
    464464        }
    465465
    466466        function site($command, $fnction="site") {
    467                 if(!$this->_exec("SITE ".$command, $fnction)) return FALSE;
    468                 if(!$this->_checkCode()) return FALSE;
    469                 return TRUE;
     467                if(!$this->_exec("SITE ".$command, $fnction)) return false;
     468                if(!$this->_checkCode()) return false;
     469                return true;
    470470        }
    471471
    472472        function chmod($pathname, $mode) {
    473                 if(!$this->site( sprintf('CHMOD %o %s', $mode, $pathname), "chmod")) return FALSE;
    474                 return TRUE;
     473                if(!$this->site( sprintf('CHMOD %o %s', $mode, $pathname), "chmod")) return false;
     474                return true;
    475475        }
    476476
    477477        function restore($from) {
    478478                if(!isset($this->_features["REST"])) {
    479479                        $this->PushError("restore", "not supported by server");
    480                         return FALSE;
     480                        return false;
    481481                }
    482482                if($this->_curtype!=FTP_BINARY) {
    483483                        $this->PushError("restore", "can't restore in ASCII mode");
    484                         return FALSE;
     484                        return false;
    485485                }
    486                 if(!$this->_exec("REST ".$from, "resore")) return FALSE;
    487                 if(!$this->_checkCode()) return FALSE;
    488                 return TRUE;
     486                if(!$this->_exec("REST ".$from, "resore")) return false;
     487                if(!$this->_checkCode()) return false;
     488                return true;
    489489        }
    490490
    491491        function features() {
    492                 if(!$this->_exec("FEAT", "features")) return FALSE;
    493                 if(!$this->_checkCode()) return FALSE;
     492                if(!$this->_exec("FEAT", "features")) return false;
     493                if(!$this->_checkCode()) return false;
    494494                $f=preg_split("/[".CRLF."]+/", preg_replace("/[0-9]{3}[ -].*[".CRLF."]+/", "", $this->_message), -1, PREG_SPLIT_NO_EMPTY);
    495495                $this->_features=array();
    496496                foreach($f as $k=>$v) {
     
    514514
    515515        function file_exists($pathname) {
    516516                $exists=true;
    517                 if(!$this->_exec("RNFR ".$pathname, "rename")) $exists=FALSE;
     517                if(!$this->_exec("RNFR ".$pathname, "rename")) $exists=false;
    518518                else {
    519                         if(!$this->_checkCode()) $exists=FALSE;
     519                        if(!$this->_checkCode()) $exists=false;
    520520                        $this->abort();
    521521                }
    522522                if($exists) $this->SendMSG("Remote file ".$pathname." exists");
     
    530530                if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
    531531                else $mode=FTP_BINARY;
    532532                if(!$this->_data_prepare($mode)) {
    533                         return FALSE;
     533                        return false;
    534534                }
    535535                if($this->_can_restore and $rest!=0) $this->restore($rest);
    536536                if(!$this->_exec("RETR ".$remotefile, "get")) {
    537537                        $this->_data_close();
    538                         return FALSE;
     538                        return false;
    539539                }
    540540                if(!$this->_checkCode()) {
    541541                        $this->_data_close();
    542                         return FALSE;
     542                        return false;
    543543                }
    544544                $out=$this->_data_read($mode, $fp);
    545545                $this->_data_close();
    546                 if(!$this->_readmsg()) return FALSE;
    547                 if(!$this->_checkCode()) return FALSE;
     546                if(!$this->_readmsg()) return false;
     547                if(!$this->_checkCode()) return false;
    548548                return $out;
    549549        }
    550550
     
    554554                $fp = @fopen($localfile, "w");
    555555                if (!$fp) {
    556556                        $this->PushError("get","can't open local file", "Cannot create \"".$localfile."\"");
    557                         return FALSE;
     557                        return false;
    558558                }
    559559                if($this->_can_restore and $rest!=0) fseek($fp, $rest);
    560560                $pi=pathinfo($remotefile);
     
    562562                else $mode=FTP_BINARY;
    563563                if(!$this->_data_prepare($mode)) {
    564564                        fclose($fp);
    565                         return FALSE;
     565                        return false;
    566566                }
    567567                if($this->_can_restore and $rest!=0) $this->restore($rest);
    568568                if(!$this->_exec("RETR ".$remotefile, "get")) {
    569569                        $this->_data_close();
    570570                        fclose($fp);
    571                         return FALSE;
     571                        return false;
    572572                }
    573573                if(!$this->_checkCode()) {
    574574                        $this->_data_close();
    575575                        fclose($fp);
    576                         return FALSE;
     576                        return false;
    577577                }
    578578                $out=$this->_data_read($mode, $fp);
    579579                fclose($fp);
    580580                $this->_data_close();
    581                 if(!$this->_readmsg()) return FALSE;
    582                 if(!$this->_checkCode()) return FALSE;
     581                if(!$this->_readmsg()) return false;
     582                if(!$this->_checkCode()) return false;
    583583                return $out;
    584584        }
    585585
     
    589589                if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
    590590                else $mode=FTP_BINARY;
    591591                if(!$this->_data_prepare($mode)) {
    592                         return FALSE;
     592                        return false;
    593593                }
    594594                if($this->_can_restore and $rest!=0) $this->restore($rest);
    595595                if(!$this->_exec("STOR ".$remotefile, "put")) {
    596596                        $this->_data_close();
    597                         return FALSE;
     597                        return false;
    598598                }
    599599                if(!$this->_checkCode()) {
    600600                        $this->_data_close();
    601                         return FALSE;
     601                        return false;
    602602                }
    603603                $ret=$this->_data_write($mode, $fp);
    604604                $this->_data_close();
    605                 if(!$this->_readmsg()) return FALSE;
    606                 if(!$this->_checkCode()) return FALSE;
     605                if(!$this->_readmsg()) return false;
     606                if(!$this->_checkCode()) return false;
    607607                return $ret;
    608608        }
    609609
     
    611611                if(is_null($remotefile)) $remotefile=$localfile;
    612612                if (!file_exists($localfile)) {
    613613                        $this->PushError("put","can't open local file", "No such file or directory \"".$localfile."\"");
    614                         return FALSE;
     614                        return false;
    615615                }
    616616                $fp = @fopen($localfile, "r");
    617617
    618618                if (!$fp) {
    619619                        $this->PushError("put","can't open local file", "Cannot read file \"".$localfile."\"");
    620                         return FALSE;
     620                        return false;
    621621                }
    622622                if($this->_can_restore and $rest!=0) fseek($fp, $rest);
    623623                $pi=pathinfo($localfile);
     
    625625                else $mode=FTP_BINARY;
    626626                if(!$this->_data_prepare($mode)) {
    627627                        fclose($fp);
    628                         return FALSE;
     628                        return false;
    629629                }
    630630                if($this->_can_restore and $rest!=0) $this->restore($rest);
    631631                if(!$this->_exec("STOR ".$remotefile, "put")) {
    632632                        $this->_data_close();
    633633                        fclose($fp);
    634                         return FALSE;
     634                        return false;
    635635                }
    636636                if(!$this->_checkCode()) {
    637637                        $this->_data_close();
    638638                        fclose($fp);
    639                         return FALSE;
     639                        return false;
    640640                }
    641641                $ret=$this->_data_write($mode, $fp);
    642642                fclose($fp);
    643643                $this->_data_close();
    644                 if(!$this->_readmsg()) return FALSE;
    645                 if(!$this->_checkCode()) return FALSE;
     644                if(!$this->_readmsg()) return false;
     645                if(!$this->_checkCode()) return false;
    646646                return $ret;
    647647        }
    648648
     
    650650                $local=realpath($local);
    651651                if(!@file_exists($local)) {
    652652                        $this->PushError("mput","can't open local folder", "Cannot stat folder \"".$local."\"");
    653                         return FALSE;
     653                        return false;
    654654                }
    655655                if(!is_dir($local)) return $this->put($local, $remote);
    656656                if(empty($remote)) $remote=".";
    657                 elseif(!$this->file_exists($remote) and !$this->mkdir($remote)) return FALSE;
     657                elseif(!$this->file_exists($remote) and !$this->mkdir($remote)) return false;
    658658                if($handle = opendir($local)) {
    659659                        $list=array();
    660660                        while (false !== ($file = readdir($handle))) {
     
    663663                        closedir($handle);
    664664                } else {
    665665                        $this->PushError("mput","can't open local folder", "Cannot read folder \"".$local."\"");
    666                         return FALSE;
     666                        return false;
    667667                }
    668                 if(empty($list)) return TRUE;
     668                if(empty($list)) return true;
    669669                $ret=true;
    670670                foreach($list as $el) {
    671671                        if(is_dir($local."/".$el)) $t=$this->mput($local."/".$el, $remote."/".$el);
    672672                        else $t=$this->put($local."/".$el, $remote."/".$el);
    673673                        if(!$t) {
    674                                 $ret=FALSE;
     674                                $ret=false;
    675675                                if(!$continious) break;
    676676                        }
    677677                }
     
    683683                $list=$this->rawlist($remote, "-lA");
    684684                if($list===false) {
    685685                        $this->PushError("mget","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
    686                         return FALSE;
     686                        return false;
    687687                }
    688688                if(empty($list)) return true;
    689689                if(!@file_exists($local)) {
    690690                        if(!@mkdir($local)) {
    691691                                $this->PushError("mget","can't create local folder", "Cannot create folder \"".$local."\"");
    692                                 return FALSE;
     692                                return false;
    693693                        }
    694694                }
    695695                foreach($list as $k=>$v) {
     
    757757        }
    758758
    759759        function mmkdir($dir, $mode = 0777) {
    760                 if(empty($dir)) return FALSE;
    761                 if($this->is_exists($dir) or $dir == "/" ) return TRUE;
     760                if(empty($dir)) return false;
     761                if($this->is_exists($dir) or $dir == "/" ) return true;
    762762                if(!$this->mmkdir(dirname($dir), $mode)) return false;
    763763                $r=$this->mkdir($dir, $mode);
    764764                $this->chmod($dir,$mode);
     
    855855                if(!$this->_data_prepare()) return false;
    856856                if(!$this->_exec($cmd.$arg, $fnction)) {
    857857                        $this->_data_close();
    858                         return FALSE;
     858                        return false;
    859859                }
    860860                if(!$this->_checkCode()) {
    861861                        $this->_data_close();
    862                         return FALSE;
     862                        return false;
    863863                }
    864864                $out="";
    865865                if($this->_code<200) {
    866866                        $out=$this->_data_read();
    867867                        $this->_data_close();
    868                         if(!$this->_readmsg()) return FALSE;
    869                         if(!$this->_checkCode()) return FALSE;
    870                         if($out === FALSE ) return FALSE;
     868                        if(!$this->_readmsg()) return false;
     869                        if(!$this->_checkCode()) return false;
     870                        if($out === false ) return false;
    871871                        $out=preg_split("/[".CRLF."]+/", $out, -1, PREG_SPLIT_NO_EMPTY);
    872872//                      $this->SendMSG(implode($this->_eol_code[$this->OS_local], $out));
    873873                }
     
    896896        }
    897897}
    898898
    899 $mod_sockets=TRUE;
     899$mod_sockets=true;
    900900if (!extension_loaded('sockets')) {
    901901        $prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : '';
    902         if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE;
     902        if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=false;
    903903}
    904904
    905905require_once "class-ftp-".($mod_sockets?"sockets":"pure").".php";
  • wp-admin/includes/class-pclzip.php

     
    277277
    278278    // ----- Set default values
    279279    $v_options = array();
    280     $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
     280    $v_options[PCLZIP_OPT_NO_COMPRESSION] = false;
    281281
    282282    // ----- Look for variable options arguments
    283283    $v_size = func_num_args();
     
    460460
    461461    // ----- Set default values
    462462    $v_options = array();
    463     $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
     463    $v_options[PCLZIP_OPT_NO_COMPRESSION] = false;
    464464
    465465    // ----- Look for variable options arguments
    466466    $v_size = func_num_args();
     
    720720    $v_size = func_num_args();
    721721
    722722    // ----- Default values for option
    723     $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
     723    $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = false;
    724724
    725725    // ----- Look for arguments
    726726    if ($v_size > 0) {
     
    877877    $v_size = func_num_args();
    878878
    879879    // ----- Default values for option
    880     $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
     880    $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = false;
    881881
    882882    // ----- Look for arguments
    883883    if ($v_size > 1) {
     
    930930          $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
    931931        }
    932932        if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) {
    933           $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
     933          $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = false;
    934934        }
    935935        else {
    936936        }
     
    14561456          }
    14571457
    14581458          // ----- Get the value
    1459           $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE);
     1459          $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], false);
    14601460          $i++;
    14611461        break;
    14621462
     
    15231523          // ----- Get the value
    15241524          if (   is_string($p_options_list[$i+1])
    15251525              && ($p_options_list[$i+1] != '')) {
    1526             $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE);
     1526            $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], false);
    15271527            $i++;
    15281528          }
    15291529          else {
     
    38843884            // ----- Decompress the file
    38853885            $v_file_content = @gzinflate($v_buffer);
    38863886            unset($v_buffer);
    3887             if ($v_file_content === FALSE) {
     3887            if ($v_file_content === false) {
    38883888
    38893889              // ----- Change the file status
    38903890              // TBC
     
    42124212          $v_data = @fread($this->zip_fd, $p_entry['compressed_size']);
    42134213
    42144214          // ----- Decompress the file
    4215           if (($p_string = @gzinflate($v_data)) === FALSE) {
     4215          if (($p_string = @gzinflate($v_data)) === false) {
    42164216              // TBC
    42174217          }
    42184218        }
     
    54745474    // ----- Look for path beginning by ./
    54755475    if (   ($p_dir == '.')
    54765476        || ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) {
    5477       $p_dir = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_dir, 1);
     5477      $p_dir = PclZipUtilTranslateWinPath(getcwd(), false).'/'.substr($p_dir, 1);
    54785478    }
    54795479    if (   ($p_path == '.')
    54805480        || ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) {
    5481       $p_path = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_path, 1);
     5481      $p_path = PclZipUtilTranslateWinPath(getcwd(), false).'/'.substr($p_path, 1);
    54825482    }
    54835483
    54845484    // ----- Explode dir and path by directory separator
  • wp-admin/includes/image.php

     
    104104                global $_wp_additional_image_sizes;
    105105
    106106                foreach ( get_intermediate_image_sizes() as $s ) {
    107                         $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => FALSE );
     107                        $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => false );
    108108                        if ( isset( $_wp_additional_image_sizes[$s]['width'] ) )
    109109                                $sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes
    110110                        else
  • wp-admin/includes/taxonomy.php

     
    146146 * @since 2.0.0
    147147 *
    148148 * @param array $catarr The 'cat_ID' value is required.  All other keys are optional.
    149  * @return int|bool The ID number of the new or updated Category on success. Zero or FALSE on failure.
     149 * @return int|bool The ID number of the new or updated Category on success. Zero or false on failure.
    150150 */
    151151function wp_update_category($catarr) {
    152152        $cat_ID = (int) $catarr['cat_ID'];
  • wp-admin/includes/template.php

     
    12581258 * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
    12591259 * @return array Array of settings errors
    12601260 */
    1261 function get_settings_errors( $setting = '', $sanitize = FALSE ) {
     1261function get_settings_errors( $setting = '', $sanitize = false ) {
    12621262        global $wp_settings_errors;
    12631263
    12641264        // If $sanitize is true, manually re-run the sanitizisation for this option
     
    13101310 * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
    13111311 * @param boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
    13121312 */
    1313 function settings_errors( $setting = '', $sanitize = FALSE, $hide_on_update = FALSE ) {
     1313function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) {
    13141314
    13151315        if ($hide_on_update AND $_GET['settings-updated']) return;
    13161316
  • wp-admin/includes/upgrade.php

     
    13301330                $option = preg_replace('|/+$|', '', $option);
    13311331
    13321332        @ $kellogs = unserialize($option);
    1333         if ($kellogs !== FALSE)
     1333        if ($kellogs !== false)
    13341334                return $kellogs;
    13351335        else
    13361336                return $option;
  • wp-admin/network/admin.php

     
    77 * @since 3.1.0
    88 */
    99
    10 define( 'WP_NETWORK_ADMIN', TRUE );
     10define( 'WP_NETWORK_ADMIN', true );
    1111
    1212/** Load WordPress Administration Bootstrap */
    1313require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
  • wp-admin/theme-editor.php

     
    8282        if (is_writeable($file)) {
    8383                //is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable
    8484                $f = fopen($file, 'w+');
    85                 if ($f !== FALSE) {
     85                if ($f !== false) {
    8686                        fwrite($f, $newcontent);
    8787                        fclose($f);
    8888                        $location = "theme-editor.php?file=$file&theme=$theme&a=te&scrollto=$scrollto";
  • wp-admin/user/admin.php

     
    77 * @since 3.1.0
    88 */
    99
    10 define('WP_USER_ADMIN', TRUE);
     10define('WP_USER_ADMIN', true);
    1111
    1212require_once( dirname(dirname(__FILE__)) . '/admin.php');
    1313
  • wp-includes/canonical.php

     
    355355                $requested_url = preg_replace_callback('|%[a-fA-F0-9][a-fA-F0-9]|', 'lowercase_octets', $requested_url);
    356356        }
    357357
    358         // Note that you can use the "redirect_canonical" filter to cancel a canonical redirect for whatever reason by returning FALSE
     358        // Note that you can use the "redirect_canonical" filter to cancel a canonical redirect for whatever reason by returning false
    359359        $redirect_url = apply_filters('redirect_canonical', $redirect_url, $requested_url);
    360360
    361361        if ( !$redirect_url || $redirect_url == $requested_url ) // yes, again -- in case the filter aborted the request
  • wp-includes/class-http.php

     
    18011801         * @since 2.8.0
    18021802         *
    18031803         * @param string $url URL you intend to send this cookie to
    1804          * @return boolean TRUE if allowed, FALSE otherwise.
     1804         * @return boolean true if allowed, false otherwise.
    18051805         */
    18061806        function test( $url ) {
    18071807                // Expires - if expired then nothing else matters
  • wp-includes/class-phpass.php

     
    4949
    5050                $this->portable_hashes = $portable_hashes;
    5151
    52                 $this->random_state = microtime() . uniqid(rand(), TRUE); // removed getmypid() for compability reasons
     52                $this->random_state = microtime() . uniqid(rand(), true); // removed getmypid() for compability reasons
    5353        }
    5454
    5555        function get_random_bytes($count)
     
    134134                # consequently in lower iteration counts and hashes that are
    135135                # quicker to crack (by non-PHP code).
    136136                if (PHP_VERSION >= '5') {
    137                         $hash = md5($salt . $password, TRUE);
     137                        $hash = md5($salt . $password, true);
    138138                        do {
    139                                 $hash = md5($hash . $password, TRUE);
     139                                $hash = md5($hash . $password, true);
    140140                        } while (--$count);
    141141                } else {
    142142                        $hash = pack('H*', md5($salt . $password));
  • wp-includes/class-pop3.php

     
    3535
    3636    var $MAILSERVER = '';       // Set this to hard code the server name
    3737
    38     var $DEBUG      = FALSE;    // set to true to echo pop3
     38    var $DEBUG      = false;    // set to true to echo pop3
    3939                                // commands and responses to error_log
    4040                                // this WILL log passwords!
    4141
    4242    var $BANNER     = '';       //  Holds the banner returned by the
    4343                                //  pop server - used for apop()
    4444
    45     var $ALLOWAPOP  = FALSE;    //  Allow or disallow apop()
     45    var $ALLOWAPOP  = false;    //  Allow or disallow apop()
    4646                                //  This must be set to true
    4747                                //  manually
    4848
  • wp-includes/comment-template.php

     
    899899                $comments_by_type = &$wp_query->comments_by_type;
    900900        }
    901901
    902         $overridden_cpage = FALSE;
     902        $overridden_cpage = false;
    903903        if ( '' == get_query_var('cpage') && get_option('page_comments') ) {
    904904                set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 );
    905                 $overridden_cpage = TRUE;
     905                $overridden_cpage = true;
    906906        }
    907907
    908908        if ( !defined('COMMENTS_TEMPLATE') || !COMMENTS_TEMPLATE)
     
    11901190 * @param string $replytext Optional. Text to display when replying to a comment. Accepts "%s" for the author of the comment being replied to.
    11911191 * @param string $linktoparent Optional. Boolean to control making the author's name a link to their comment.
    11921192 */
    1193 function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = TRUE ) {
     1193function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = true ) {
    11941194        global $comment;
    11951195
    11961196        if ( false === $noreplytext ) $noreplytext = __( 'Leave a Reply' );
  • wp-includes/compat.php

     
    2727                        $k = $key . '%5B' . $k . '%5D';
    2828                if ( $v === NULL )
    2929                        continue;
    30                 elseif ( $v === FALSE )
     30                elseif ( $v === false )
    3131                        $v = '0';
    3232
    3333                if ( is_array($v) || is_object($v) )
  • wp-includes/general-template.php

     
    20992099 * "Intelligently" decides to enqueue or to print the CSS file. If the
    21002100 * 'wp_print_styles' action has *not* yet been called, the CSS file will be
    21012101 * enqueued. If the wp_print_styles action *has* been called, the CSS link will
    2102  * be printed. Printing may be forced by passing TRUE as the $force_echo
     2102 * be printed. Printing may be forced by passing true as the $force_echo
    21032103 * (second) parameter.
    21042104 *
    21052105 * For backward compatibility with WordPress 2.3 calling method: If the $file
  • wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php

     
    7878                        curl_setopt($ch, CURLOPT_URL,$url);
    7979                        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    8080                        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
    81                         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
     81                        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    8282                        $xml = curl_exec($ch);
    8383                        curl_close($ch);
    8484                } else {
  • wp-includes/kses.php

     
    766766                                        {
    767767                                        $working = 1;
    768768                                        $mode = 0;
    769                                         if(FALSE === array_key_exists($attrname, $attrarr)) {
     769                                        if(false === array_key_exists($attrname, $attrarr)) {
    770770                                                $attrarr[$attrname] = array ('name' => $attrname, 'value' => '', 'whole' => $attrname, 'vless' => 'y');
    771771                                        }
    772772                                        $attr = preg_replace('/^\s+/', '', $attr);
     
    783783                                        if ( in_array(strtolower($attrname), $uris) )
    784784                                                $thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
    785785
    786                                         if(FALSE === array_key_exists($attrname, $attrarr)) {
     786                                        if(false === array_key_exists($attrname, $attrarr)) {
    787787                                                $attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname=\"$thisval\"", 'vless' => 'n');
    788788                                        }
    789789                                        $working = 1;
     
    799799                                        if ( in_array(strtolower($attrname), $uris) )
    800800                                                $thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
    801801
    802                                         if(FALSE === array_key_exists($attrname, $attrarr)) {
     802                                        if(false === array_key_exists($attrname, $attrarr)) {
    803803                                                $attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname='$thisval'", 'vless' => 'n');
    804804                                        }
    805805                                        $working = 1;
     
    815815                                        if ( in_array(strtolower($attrname), $uris) )
    816816                                                $thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
    817817
    818                                         if(FALSE === array_key_exists($attrname, $attrarr)) {
     818                                        if(false === array_key_exists($attrname, $attrarr)) {
    819819                                                $attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname=\"$thisval\"", 'vless' => 'n');
    820820                                        }
    821821                                        # We add quotes to conform to W3C's HTML spec.
     
    834834                }
    835835        } # while
    836836
    837         if ($mode == 1 && FALSE === array_key_exists($attrname, $attrarr))
     837        if ($mode == 1 && false === array_key_exists($attrname, $attrarr))
    838838                # special case, for when the attribute list ends with a valueless
    839839                # attribute like "selected"
    840840                $attrarr[$attrname] = array ('name' => $attrname, 'value' => '', 'whole' => $attrname, 'vless' => 'y');
  • wp-includes/link-template.php

     
    24562456                $text = __('This is the short link.');
    24572457
    24582458        if ( empty( $title ) )
    2459                 $title = the_title_attribute( array( 'echo' => FALSE ) );
     2459                $title = the_title_attribute( array( 'echo' => false ) );
    24602460
    24612461        $shortlink = wp_get_shortlink( $post->ID );
    24622462
  • wp-includes/pluggable.php

     
    14491449        if ( empty($wp_hasher) ) {
    14501450                require_once( ABSPATH . 'wp-includes/class-phpass.php');
    14511451                // By default, use the portable hash from phpass
    1452                 $wp_hasher = new PasswordHash(8, TRUE);
     1452                $wp_hasher = new PasswordHash(8, true);
    14531453        }
    14541454
    14551455        return $wp_hasher->HashPassword($password);
     
    14971497        if ( empty($wp_hasher) ) {
    14981498                require_once( ABSPATH . 'wp-includes/class-phpass.php');
    14991499                // By default, use the portable hash from phpass
    1500                 $wp_hasher = new PasswordHash(8, TRUE);
     1500                $wp_hasher = new PasswordHash(8, true);
    15011501        }
    15021502
    15031503        $check = $wp_hasher->CheckPassword($password, $hash);
  • wp-includes/post.php

     
    40564056 * @return string SQL code that can be added to a where clause.
    40574057 */
    40584058function get_private_posts_cap_sql($post_type) {
    4059         return get_posts_by_author_sql($post_type, FALSE);
     4059        return get_posts_by_author_sql($post_type, false);
    40604060}
    40614061
    40624062/**
     
    40704070 * @param int $post_author Optional.  Query posts having a single author ID.
    40714071 * @return string SQL WHERE code that can be added to a query.
    40724072 */
    4073 function get_posts_by_author_sql($post_type, $full = TRUE, $post_author = NULL) {
     4073function get_posts_by_author_sql($post_type, $full = true, $post_author = NULL) {
    40744074        global $user_ID, $wpdb;
    40754075
    40764076        // Private posts
  • wp-includes/theme.php

     
    12661266 *
    12671267 * Does not check the default theme, which is the fallback and should always exist.
    12681268 * Will switch theme to the fallback theme if current theme does not validate.
    1269  * You can use the 'validate_current_theme' filter to return FALSE to
     1269 * You can use the 'validate_current_theme' filter to return false to
    12701270 * disable this functionality.
    12711271 *
    12721272 * @since 1.5.0
  • wp-includes/user.php

     
    154154function count_user_posts($userid) {
    155155        global $wpdb;
    156156
    157         $where = get_posts_by_author_sql('post', TRUE, $userid);
     157        $where = get_posts_by_author_sql('post', true, $userid);
    158158
    159159        $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts $where" );
    160160
     
    846846                // Build a CPU-intensive query that will return concise information.
    847847                $select_count = array();
    848848                foreach ( $avail_roles as $this_role => $name ) {
    849                         $select_count[] = "COUNT(NULLIF(`meta_value` LIKE '%" . like_escape($this_role) . "%', FALSE))";
     849                        $select_count[] = "COUNT(NULLIF(`meta_value` LIKE '%" . like_escape($this_role) . "%', false))";
    850850                }
    851851                $select_count = implode(', ', $select_count);
    852852
  • wp-login.php

     
    606606                $errors->add('test_cookie', __("<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."));
    607607
    608608        // Some parts of this script use the main login form to display a message
    609         if              ( isset($_GET['loggedout']) && TRUE == $_GET['loggedout'] )
     609        if              ( isset($_GET['loggedout']) && true == $_GET['loggedout'] )
    610610                $errors->add('loggedout', __('You are now logged out.'), 'message');
    611611        elseif  ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] )
    612612                $errors->add('registerdisabled', __('User registration is currently not allowed.'));