CSS是解决这一问题的方法。
使用admin_enqueue_scripts
钩子主题函数。php(如果没有,you\'re doing something wrong)
function my_admin_enqueue_style() {
wp_enqueue_style(\'my-css\', get_stylesheet_directory_uri().\'/css/my-admin.css\', array(), \'1.0.0\');
}
add_action(\'admin_enqueue_scripts\', \'my_admin_enqueue_style\');
在你的my admin中。css文件
/* change the content to another Dashicon */
#wp-content-editor-tools .wp-media-buttons .add_media span.wp-media-buttons-icon::before {
content: "\\f104";
}
/* or set a background-image instead (set content to "" in the rule before) */
#wp-content-editor-tools .wp-media-buttons .add_media span.wp-media-buttons-icon {
background-image: url(../../wp-content/uploads/2017/10/my-image.png);
background-position: center;
}
Available Dashicon icons here