回答編集履歴
1
ミスがあったため修正。
answer
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
```PHP
|
3
3
|
function replaceImagePath($arg) {
|
4
4
|
$content = str_replace('"images/', '"' . get_bloginfo('template_directory') . '/images/', $arg);
|
5
|
-
$content = str_replace(',images/', '
|
5
|
+
$content = str_replace(',images/', ',' . get_bloginfo('template_directory') . '/images/', $content); // ミスがあったため修正
|
6
6
|
return $content;
|
7
7
|
}
|
8
8
|
add_action('the_content', 'replaceImagePath');
|