我终于这样做了:
$form_styles_header = [
"1" => "forms/vendor/bootstrap/css/bootstrap.min.css",
"2" => "forms/fonts/font-awesome-4.7.0/css/font-awesome.min.css",
"3" => "forms/vendor/animate/animate.css",
"4" => "forms/vendor/css-hamburgers/hamburgers.min.css",
"5" => "forms/vendor/animsition/css/animsition.min.css",
"6" => "forms/vendor/select2/select2.min.css",
"7" => "forms/vendor/daterangepicker/daterangepicker.css",
"8" => "forms/css/util.css",
"9" => "forms/css/main.css",
"10" => "table/css/table-styles.css"
];
foreach ($form_styles_header as $no=>$form_style) {
wp_enqueue_style(\'du_form_style\'.$no, $d_utility_url."/assets/".$form_style);
}
其中$d\\u utility\\u url是指向我的插件的路径。这工作正常,问题已解决。