Ticket #19032: 19032.diff
File 19032.diff, 4.0 KB (added by , 14 years ago) |
---|
-
wp-includes/link-template.php
function get_home_url( $blog_id = null, $path = '', $scheme = null ) { 1871 1871 if ( 'http' != $scheme ) 1872 1872 $url = str_replace( 'http://', "$scheme://", $url ); 1873 1873 1874 if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false)1874 if ( !empty( $path ) && is_string( $path ) ) 1875 1875 $url .= '/' . ltrim( $path, '/' ); 1876 1876 1877 1877 return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id ); … … function get_site_url( $blog_id = null, $path = '', $scheme = null ) { 1934 1934 if ( 'http' != $scheme ) 1935 1935 $url = str_replace( 'http://', "{$scheme}://", $url ); 1936 1936 1937 if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false)1937 if ( !empty( $path ) && is_string( $path ) ) 1938 1938 $url .= '/' . ltrim( $path, '/' ); 1939 1939 1940 1940 return apply_filters( 'site_url', $url, $path, $orig_scheme, $blog_id ); … … function admin_url( $path = '', $scheme = 'admin' ) { 1968 1968 function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) { 1969 1969 $url = get_site_url($blog_id, 'wp-admin/', $scheme); 1970 1970 1971 if ( !empty($path) && is_string($path) && strpos($path, '..') === false)1971 if ( !empty($path) && is_string($path) ) 1972 1972 $url .= ltrim($path, '/'); 1973 1973 1974 1974 return apply_filters('admin_url', $url, $path, $blog_id); … … function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) { 1986 1986 function includes_url($path = '') { 1987 1987 $url = site_url() . '/' . WPINC . '/'; 1988 1988 1989 if ( !empty($path) && is_string($path) && strpos($path, '..') === false)1989 if ( !empty($path) && is_string($path) ) 1990 1990 $url .= ltrim($path, '/'); 1991 1991 1992 1992 return apply_filters('includes_url', $url, $path); … … function content_url($path = '') { 2006 2006 if ( 0 === strpos($url, 'http') && is_ssl() ) 2007 2007 $url = str_replace( 'http://', 'https://', $url ); 2008 2008 2009 if ( !empty($path) && is_string($path) && strpos($path, '..') === false)2009 if ( !empty($path) && is_string($path) ) 2010 2010 $url .= '/' . ltrim($path, '/'); 2011 2011 2012 2012 return apply_filters('content_url', $url, $path); … … function plugins_url($path = '', $plugin = '') { 2045 2045 $url .= '/' . ltrim($folder, '/'); 2046 2046 } 2047 2047 2048 if ( !empty($path) && is_string($path) && strpos($path, '..') === false)2048 if ( !empty($path) && is_string($path) ) 2049 2049 $url .= '/' . ltrim($path, '/'); 2050 2050 2051 2051 return apply_filters('plugins_url', $url, $path, $plugin); … … function network_site_url( $path = '', $scheme = null ) { 2085 2085 2086 2086 $url = $scheme . '://' . $current_site->domain . $current_site->path; 2087 2087 2088 if ( !empty($path) && is_string($path) && strpos($path, '..') === false)2088 if ( !empty($path) && is_string($path) ) 2089 2089 $url .= ltrim($path, '/'); 2090 2090 2091 2091 return apply_filters('network_site_url', $url, $path, $orig_scheme); … … function network_home_url( $path = '', $scheme = null ) { 2118 2118 2119 2119 $url = $scheme . '://' . $current_site->domain . $current_site->path; 2120 2120 2121 if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false)2121 if ( !empty( $path ) && is_string( $path ) ) 2122 2122 $url .= ltrim( $path, '/' ); 2123 2123 2124 2124 return apply_filters( 'network_home_url', $url, $path, $orig_scheme); … … function network_admin_url( $path = '', $scheme = 'admin' ) { 2140 2140 2141 2141 $url = network_site_url('wp-admin/network/', $scheme); 2142 2142 2143 if ( !empty($path) && is_string($path) && strpos($path, '..') === false)2143 if ( !empty($path) && is_string($path) ) 2144 2144 $url .= ltrim($path, '/'); 2145 2145 2146 2146 return apply_filters('network_admin_url', $url, $path); … … function network_admin_url( $path = '', $scheme = 'admin' ) { 2159 2159 function user_admin_url( $path = '', $scheme = 'admin' ) { 2160 2160 $url = network_site_url('wp-admin/user/', $scheme); 2161 2161 2162 if ( !empty($path) && is_string($path) && strpos($path, '..') === false)2162 if ( !empty($path) && is_string($path) ) 2163 2163 $url .= ltrim($path, '/'); 2164 2164 2165 2165 return apply_filters('user_admin_url', $url, $path);