From a70d027f65d57e82aecdb6f04d3470d85f5dfd43 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Sun, 23 Sep 2018 18:39:30 -0500 Subject: [PATCH] =?UTF-8?q?Fixes=20#3450=20=E2=80=93=20SITELINKS=5FALT=20p?= =?UTF-8?q?arent=20button=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parent links in sitelinks_alt::sitelinks_alt_shortcode() now have their button image URI parsed by e_parse::replaceConstants(), bringing it into consistency with the children, which are already parsed the same way. There is no corresponding test for this in e107-test because hard-coded dependencies in sitelinks_alt::sitelinks_alt_shortcode() are difficult to monkey-patch without crippling the performance of e107-test. --- e107_core/shortcodes/single/sitelinks_alt.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/e107_core/shortcodes/single/sitelinks_alt.php b/e107_core/shortcodes/single/sitelinks_alt.php index e96b3b267..f49a26c92 100644 --- a/e107_core/shortcodes/single/sitelinks_alt.php +++ b/e107_core/shortcodes/single/sitelinks_alt.php @@ -68,7 +68,11 @@ class sitelinks_alt } else { - $link_icon = $lk['link_button'] ? e_IMAGE_ABS.'icons/'.$lk['link_button'] : $icon; + $link_icon = $lk['link_button'] + ? (($lk['link_button'][0] == "{") + ? $tp->replaceConstants($lk['link_button'],'abs') + : e_IMAGE_ABS.'icons/'.$lk['link_button']) + : $icon; } $main_linkid = $lk['link_id'];