From ce4069de17117761b70751c1a4d430fb523e1d4e Mon Sep 17 00:00:00 2001 From: n0099 Date: Sat, 12 Nov 2022 03:14:44 +0800 Subject: [PATCH 1/2] apply `smilies_src` filter in `pages/page-smilies.php` --- pages/page-smilies.php | 49 +++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/pages/page-smilies.php b/pages/page-smilies.php index 285892f9..b29bc982 100644 --- a/pages/page-smilies.php +++ b/pages/page-smilies.php @@ -6,25 +6,30 @@ * @license GPL-3.0 License * @version 2022.01.26 */ -$smilies = ' - - - - - - - - - - - - - - - - - - - - -'; +$smilies = array_map(function ($s) { + return ''; +}, [ + 'razz', + 'evil', + 'exclaim', + 'smile', + 'redface', + 'biggrin', + 'eek', + 'confused', + 'idea', + 'lol', + 'mad', + 'twisted', + 'rolleyes', + 'wink', + 'cool', + 'arrow', + 'neutral', + 'cry', + 'mrgreen', + 'drooling', + 'persevering' +]); From 974bc7b5493ffe827a942eccd997da1ea7929775 Mon Sep 17 00:00:00 2001 From: n0099 Date: Sat, 12 Nov 2022 03:21:07 +0800 Subject: [PATCH 2/2] Update page-smilies.php --- pages/page-smilies.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/page-smilies.php b/pages/page-smilies.php index b29bc982..6e675bb9 100644 --- a/pages/page-smilies.php +++ b/pages/page-smilies.php @@ -6,10 +6,10 @@ * @license GPL-3.0 License * @version 2022.01.26 */ -$smilies = array_map(function ($s) { +$smilies = join("\n", array_map(function ($s) { return ''; + . apply_filter('smilies_src', ASSET_PATH . "/assets/img/smilies/{$s}.png", "{$s}.png", site_url()) + . '" alt="' . $s . '" class="d-block"/>'; }, [ 'razz', 'evil', @@ -32,4 +32,4 @@ 'mrgreen', 'drooling', 'persevering' -]); +]));