Make WordPress Core

Ticket #19032: 19032.diff

File 19032.diff, 4.0 KB (added by markjaquith, 14 years ago)
  • wp-includes/link-template.php

    function get_home_url( $blog_id = null, $path = '', $scheme = null ) { 
    18711871        if ( 'http' != $scheme )
    18721872                $url = str_replace( 'http://', "$scheme://", $url );
    18731873
    1874         if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false )
     1874        if ( !empty( $path ) && is_string( $path ) )
    18751875                $url .= '/' . ltrim( $path, '/' );
    18761876
    18771877        return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id );
    function get_site_url( $blog_id = null, $path = '', $scheme = null ) { 
    19341934        if ( 'http' != $scheme )
    19351935                $url = str_replace( 'http://', "{$scheme}://", $url );
    19361936
    1937         if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false )
     1937        if ( !empty( $path ) && is_string( $path ) )
    19381938                $url .= '/' . ltrim( $path, '/' );
    19391939
    19401940        return apply_filters( 'site_url', $url, $path, $orig_scheme, $blog_id );
    function admin_url( $path = '', $scheme = 'admin' ) { 
    19681968function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
    19691969        $url = get_site_url($blog_id, 'wp-admin/', $scheme);
    19701970
    1971         if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
     1971        if ( !empty($path) && is_string($path) )
    19721972                $url .= ltrim($path, '/');
    19731973
    19741974        return apply_filters('admin_url', $url, $path, $blog_id);
    function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) { 
    19861986function includes_url($path = '') {
    19871987        $url = site_url() . '/' . WPINC . '/';
    19881988
    1989         if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
     1989        if ( !empty($path) && is_string($path) )
    19901990                $url .= ltrim($path, '/');
    19911991
    19921992        return apply_filters('includes_url', $url, $path);
    function content_url($path = '') { 
    20062006        if ( 0 === strpos($url, 'http') && is_ssl() )
    20072007                $url = str_replace( 'http://', 'https://', $url );
    20082008
    2009         if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
     2009        if ( !empty($path) && is_string($path) )
    20102010                $url .= '/' . ltrim($path, '/');
    20112011
    20122012        return apply_filters('content_url', $url, $path);
    function plugins_url($path = '', $plugin = '') { 
    20452045                        $url .= '/' . ltrim($folder, '/');
    20462046        }
    20472047
    2048         if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
     2048        if ( !empty($path) && is_string($path) )
    20492049                $url .= '/' . ltrim($path, '/');
    20502050
    20512051        return apply_filters('plugins_url', $url, $path, $plugin);
    function network_site_url( $path = '', $scheme = null ) { 
    20852085
    20862086        $url = $scheme . '://' . $current_site->domain . $current_site->path;
    20872087
    2088         if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
     2088        if ( !empty($path) && is_string($path) )
    20892089                $url .= ltrim($path, '/');
    20902090
    20912091        return apply_filters('network_site_url', $url, $path, $orig_scheme);
    function network_home_url( $path = '', $scheme = null ) { 
    21182118
    21192119        $url = $scheme . '://' . $current_site->domain . $current_site->path;
    21202120
    2121         if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false )
     2121        if ( !empty( $path ) && is_string( $path ) )
    21222122                $url .= ltrim( $path, '/' );
    21232123
    21242124        return apply_filters( 'network_home_url', $url, $path, $orig_scheme);
    function network_admin_url( $path = '', $scheme = 'admin' ) { 
    21402140
    21412141        $url = network_site_url('wp-admin/network/', $scheme);
    21422142
    2143         if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
     2143        if ( !empty($path) && is_string($path) )
    21442144                $url .= ltrim($path, '/');
    21452145
    21462146        return apply_filters('network_admin_url', $url, $path);
    function network_admin_url( $path = '', $scheme = 'admin' ) { 
    21592159function user_admin_url( $path = '', $scheme = 'admin' ) {
    21602160        $url = network_site_url('wp-admin/user/', $scheme);
    21612161
    2162         if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
     2162        if ( !empty($path) && is_string($path) )
    21632163                $url .= ltrim($path, '/');
    21642164
    21652165        return apply_filters('user_admin_url', $url, $path);