Plugin Directory

Changeset 789678


Ignore:
Timestamp:
10/18/2013 07:46:40 AM (12 years ago)
Author:
stariy
Message:

修改文章内不能读取相对路径图片的问题

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-sns-share/trunk/sync_functions.php

    r787197 r789678  
    275275                continue;
    276276            }
     277            if(strlen($imgs[$i]) > 0 && $imgs[$i][0] == '/'){
     278                $home = home_url();
     279                if($home[strlen($home) - 1] == '/'){
     280                    $imgs[$i] = $home.substr($imgs[$i], 1);
     281                }
     282                else{
     283                    $imgs[$i] = $home.$imgs[$i];
     284                }
     285            }
    277286            $imglist[] = $imgs[$i];
    278287        }
Note: See TracChangeset for help on using the changeset viewer.