diff options
author | Andrew Dolgov <[email protected]> | 2010-01-11 13:47:15 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-01-11 13:47:15 +0300 |
commit | fbaca24658379ea3efe92dbeb0f779f95c02fe6a (patch) | |
tree | be8616bb9764b3a57b5b595e4288e522e4efd401 /functions.php | |
parent | 3b0a65adea082b96b0d6263d9e6bdefdd6a07a43 (diff) |
do not display image attachments inline when STRIP_IMAGES is enabled
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/functions.php b/functions.php index d7ebef3fc..057fa447a 100644 --- a/functions.php +++ b/functions.php @@ -4814,12 +4814,14 @@ print "<div class=\"postEnclosures\">"; - if ($always_display_enclosures || !preg_match("/<img/i", $article_content)) { - foreach ($entries as $entry) { - if (preg_match("/image/", $entry["type"])) { - print "<p><img - alt=\"".htmlspecialchars($entry["filename"])."\" - src=\"" .htmlspecialchars($entry["url"]) . "\"></p>"; + if (!get_pref($link, "STRIP_IMAGES")) { + if ($always_display_enclosures || !preg_match("/<img/i", $article_content)) { + foreach ($entries as $entry) { + if (preg_match("/image/", $entry["type"])) { + print "<p><img + alt=\"".htmlspecialchars($entry["filename"])."\" + src=\"" .htmlspecialchars($entry["url"]) . "\"></p>"; + } } } } @@ -5392,12 +5394,14 @@ $always_display_enclosures = db_fetch_result($tmp_result, 0, "always_display_enclosures"); - if ($always_display_enclosures || !preg_match("/img/i", $article_content)) { - foreach ($entries as $entry) { - if (preg_match("/image/", $entry["type"])) { - print "<p><img - alt=\"".htmlspecialchars($entry["filename"])."\" - src=\"" .htmlspecialchars($entry["url"]) . "\"></p>"; + if (!get_pref($link, "STRIP_IMAGES")) { + if ($always_display_enclosures || !preg_match("/img/i", $article_content)) { + foreach ($entries as $entry) { + if (preg_match("/image/", $entry["type"])) { + print "<p><img + alt=\"".htmlspecialchars($entry["filename"])."\" + src=\"" .htmlspecialchars($entry["url"]) . "\"></p>"; + } } } } |