WordPress.org

Make WordPress Core

Changeset 17603


Ignore:
Timestamp:
04/05/11 17:13:04 (4 years ago)
Author:
ryan
Message:

Take out unnecessary compat functions from compat.php. Props hakre, ptahdunbar. see #16918

Location:
trunk
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image-edit.php

    r17534 r17603  
    552552    // generate new filename 
    553553    $path = get_attached_file($post_id); 
    554     $path_parts = pathinfo52( $path ); 
     554    $path_parts = pathinfo( $path ); 
    555555    $filename = $path_parts['filename']; 
    556556    $suffix = time() . rand(100, 999); 
  • trunk/wp-admin/setup-config.php

    r16788 r17603  
    4141 
    4242require_once(ABSPATH . WPINC . '/load.php'); 
    43 require_once(ABSPATH . WPINC . '/compat.php'); 
    4443require_once(ABSPATH . WPINC . '/functions.php'); 
    4544require_once(ABSPATH . WPINC . '/class-wp-error.php'); 
  • trunk/wp-includes/functions.php

    r17555 r17603  
    13691369function build_query( $data ) { 
    13701370    return _http_build_query( $data, null, '&', '', false ); 
     1371} 
     1372 
     1373// from php.net (modified by Mark Jaquith to behave like the native PHP5 function) 
     1374function _http_build_query($data, $prefix=null, $sep=null, $key='', $urlencode=true) { 
     1375    $ret = array(); 
     1376 
     1377    foreach ( (array) $data as $k => $v ) { 
     1378        if ( $urlencode) 
     1379            $k = urlencode($k); 
     1380        if ( is_int($k) && $prefix != null ) 
     1381            $k = $prefix.$k; 
     1382        if ( !empty($key) ) 
     1383            $k = $key . '%5B' . $k . '%5D'; 
     1384        if ( $v === NULL ) 
     1385            continue; 
     1386        elseif ( $v === FALSE ) 
     1387            $v = '0'; 
     1388 
     1389        if ( is_array($v) || is_object($v) ) 
     1390            array_push($ret,_http_build_query($v, '', $sep, $k, $urlencode)); 
     1391        elseif ( $urlencode ) 
     1392            array_push($ret, $k.'='.urlencode($v)); 
     1393        else 
     1394            array_push($ret, $k.'='.$v); 
     1395    } 
     1396 
     1397    if ( NULL === $sep ) 
     1398        $sep = ini_get('arg_separator.output'); 
     1399 
     1400    return implode($sep, $ret); 
    13711401} 
    13721402 
  • trunk/wp-settings.php

    r17573 r17603  
    6464 
    6565// Load early WordPress files. 
    66 require( ABSPATH . WPINC . '/compat.php' ); 
    6766require( ABSPATH . WPINC . '/functions.php' ); 
    6867require( ABSPATH . WPINC . '/class-wp.php' ); 
Note: See TracChangeset for help on using the changeset viewer.