mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
use homeurl(), props PeteMall, see #9008
git-svn-id: https://develop.svn.wordpress.org/trunk@14429 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3130,9 +3130,9 @@ function &get_pages($args = '') {
|
||||
* @return bool True on success, false on failure.
|
||||
*/
|
||||
function is_local_attachment($url) {
|
||||
if (strpos($url, get_bloginfo('url')) === false)
|
||||
if (strpos($url, home_url()) === false)
|
||||
return false;
|
||||
if (strpos($url, get_bloginfo('url') . '/?attachment_id=') !== false)
|
||||
if (strpos($url, home_url('/?attachment_id=')) !== false)
|
||||
return true;
|
||||
if ( $id = url_to_postid($url) ) {
|
||||
$post = & get_post($id);
|
||||
|
||||
Reference in New Issue
Block a user