function mobile_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { $content = get_the_content($more_link_text, $stripteaser, $more_file); $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); $content = str_replace('', '', $content); $content = preg_replace("/]*?\>/is", "", $content); $content = preg_replace("/<\/a>/", "", $content); $imgstr = ']*src=[\"\']([^\"\'>]*)[\"\'][^>]*alt=[\"\']([^\"\'>]*)[\"\'][^>]*>'; $repstr = '['.'IMAGE:'.'\\2]'; $content = mbereg_replace($imgstr, $repstr, $content); /* alt なしの img タグも置換する 20051105 add by hiromasa --> */ $imgstr = ']*src=[\"\']([^\"\'>]*)[\"\'][^>]*>'; $repstr = '['.'IMAGE:'.']'; $content = mbereg_replace($imgstr, $repstr, $content); /* <-- */ echo mobile_encode($content); }