实际上,您可以将样式表的目录放在mu插件目录中。我把我的称为“我的公司资产”。棘手的部分是将您的样式调用到您的mu插件中。在主MU插件文件中。。。
// Setup MY AWESOME MU plugin url
// This will help if you switch to multisite some day
if (is_multisite()) {
define(\'MY_AWESOME_MU_PLUGIN_URL\', network_site_url(\'/wp-content/mu-plugins\', \'relative\'));
} else {
define(\'MY_AWESOME_MU_PLUGIN_URL\', content_url(\'/mu-plugins\'));
}
// Then you can just use wp-enqueue_style like normal
wp_enqueue_style( \'my-mu-styles\', MY_AWESOME_MU_PLUGIN_URL.\'/my-companies-assets/styles.css\', array(), 1 );
/**
* The rest of your plugin code
* goes here
*/