From 3180136e46d9800035a2ca70ee01468482dcfa05 Mon Sep 17 00:00:00 2001 From: liaoxin Date: Sat, 16 May 2026 22:47:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=8B=E5=8A=A8=E8=B0=83=E7=94=A8=20w?= =?UTF-8?q?p=5Fenqueue=5Fmedia()=20=E5=8A=A0=E8=BD=BD=E5=AA=92=E4=BD=93?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/functions.php b/functions.php index dc390fd..8312209 100644 --- a/functions.php +++ b/functions.php @@ -151,6 +151,7 @@ add_action('template_include', function($template) { add_action('show_user_profile', 'kjweji_avatar_field'); add_action('edit_user_profile', 'kjweji_avatar_field'); function kjweji_avatar_field($user) { + wp_enqueue_media(); $att_id = get_user_meta($user->ID, 'custom_avatar', true); $preview = $att_id ? wp_get_attachment_image_url($att_id, 'medium') : ''; wp_nonce_field('kjweji_avatar_nonce', 'kjweji_avatar_nonce_field');