如何在Wordpress的“编辑帖子”屏幕上的“精选图像”元框中添加自定义消息?
在https://wordpress.org/support/topic/edited-post-thumbnail-metabox-wont-display-correctly/找到答案
/** * Add label to post thumbnail meta box */ function swd_admin_post_thumbnail_add_label($content, $post_id, $thumbnail_id) { $post = get_post($post_id); if ($post->post_type == 'post') { $content .= '<small><i>(Add image larger than 700 x 458 px)</small></i>'; return $content; } return $content; } add_filter('admin_post_thumbnail_html', 'swd_admin_post_thumbnail_add_label', 10, 3);
1 回答
在https://wordpress.org/support/topic/edited-post-thumbnail-metabox-wont-display-correctly/找到答案