use homeurl(), props PeteMall, see #9008

git-svn-id: http://svn.automattic.com/wordpress/trunk@14429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
wpmuguru 2010-05-04 00:28:29 +00:00
parent 2ecda01ce0
commit abed02b32d
4 changed files with 5 additions and 5 deletions

View File

@ -251,7 +251,7 @@ class WP_Http {
$r['ssl'] = $arrURL['scheme'] == 'https' || $arrURL['scheme'] == 'ssl'; $r['ssl'] = $arrURL['scheme'] == 'https' || $arrURL['scheme'] == 'ssl';
// Determine if this request is to OUR install of WordPress // Determine if this request is to OUR install of WordPress
$homeURL = parse_url(get_bloginfo('url')); $homeURL = home_url();
$r['local'] = $homeURL['host'] == $arrURL['host'] || 'localhost' == $arrURL['host']; $r['local'] = $homeURL['host'] == $arrURL['host'] || 'localhost' == $arrURL['host'];
unset($homeURL); unset($homeURL);

View File

@ -240,7 +240,7 @@ wp_admin_css( 'wp-admin', true );
<h2><?php _e('About TinyMCE'); ?></h2> <h2><?php _e('About TinyMCE'); ?></h2>
<p><?php _e('Version:'); ?> <span id="version"></span> (<span id="date"></span>)</p> <p><?php _e('Version:'); ?> <span id="version"></span> (<span id="date"></span>)</p>
<p><?php printf(__('TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under %sLGPL</a> by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.'), '<a href="'.get_bloginfo('url').'/wp-includes/js/tinymce/license.txt" target="_blank" title="'.__('GNU Library General Public Licence').'">') ?></p> <p><?php printf(__('TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under %sLGPL</a> by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.'), '<a href="'.home_url('/wp-includes/js/tinymce/license.txt').'" target="_blank" title="'.__('GNU Library General Public Licence').'">') ?></p>
<p><?php _e('Copyright &copy; 2003-2007, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.') ?></p> <p><?php _e('Copyright &copy; 2003-2007, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.') ?></p>
<p><?php _e('For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.') ?></p> <p><?php _e('For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.') ?></p>

View File

@ -321,7 +321,7 @@ function get_attachment_link($id = false) {
} }
if ( ! $link ) if ( ! $link )
$link = trailingslashit(get_bloginfo('url')) . "?attachment_id=$id"; $link = home_url( "/?attachment_id=$id" );
return apply_filters('attachment_link', $link, $id); return apply_filters('attachment_link', $link, $id);
} }

View File

@ -3130,9 +3130,9 @@ function &get_pages($args = '') {
* @return bool True on success, false on failure. * @return bool True on success, false on failure.
*/ */
function is_local_attachment($url) { function is_local_attachment($url) {
if (strpos($url, get_bloginfo('url')) === false) if (strpos($url, home_url()) === false)
return false; return false;
if (strpos($url, get_bloginfo('url') . '/?attachment_id=') !== false) if (strpos($url, home_url('/?attachment_id=')) !== false)
return true; return true;
if ( $id = url_to_postid($url) ) { if ( $id = url_to_postid($url) ) {
$post = & get_post($id); $post = & get_post($id);