下面是我从html模板中嵌入的原始javascript。但我不知道如何将其添加到我的函数中。php文件。这似乎很难。请您使用wp_enqueue_script
作用
<script src="../assets/components/plugins/ajaxify/script.min.js?v=v1.9.6&sv=v0.0.1"></script>
<script>var App = {};</script>
<script data-id="App.Scripts">
App.Scripts = {
/* CORE scripts always load first; */
core: [
\'../assets/components/library/jquery/jquery.min.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/library/modernizr/modernizr.js?v=v1.9.6&sv=v0.0.1\'
],
/* PLUGINS_DEPENDENCY always load after CORE but before PLUGINS; */
plugins_dependency: [
\'../assets/components/library/bootstrap/js/bootstrap.min.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/library/jquery/jquery-migrate.min.js?v=v1.9.6&sv=v0.0.1\'
],
/* PLUGINS always load after CORE and PLUGINS_DEPENDENCY, but before the BUNDLE / initialization scripts; */
plugins: [
\'../assets/components/plugins/nicescroll/jquery.nicescroll.min.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/plugins/breakpoints/breakpoints.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/plugins/ajaxify/davis.min.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/plugins/ajaxify/jquery.lazyjaxdavis.min.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/plugins/preload/pace/pace.min.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/plugins/owl-carousel/owl.carousel.min.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/common/forms/elements/bootstrap-select/assets/lib/js/bootstrap-select.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/plugins/less-js/less.min.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/modules/admin/charts/flot/assets/lib/excanvas.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/plugins/browser/ie/ie.prototype.polyfill.js?v=v1.9.6&sv=v0.0.1\'
],
/* The initialization scripts always load last and are automatically and dynamically loaded when AJAX navigation is enabled; */
bundle: [
\'../assets/components/plugins/ajaxify/ajaxify.init.js?v=v1.9.6\',
\'../assets/components/core/js/preload.pace.init.js?v=v1.9.6\',
\'../assets/components/modules/admin/content/assets/news-featured-2.init.js?v=v1.9.6\',
\'../assets/components/modules/admin/content/assets/news-featured-1.init.js?v=v1.9.6\',
\'../assets/components/modules/admin/content/assets/news-featured-3.init.js?v=v1.9.6\',
\'../assets/components/core/js/sidebar.main.init.js?v=v1.9.6\',
\'../assets/components/core/js/sidebar.collapse.init.js?v=v1.9.6\',
\'../assets/components/common/forms/elements/bootstrap-select/assets/custom/js/bootstrap-select.init.js?v=v1.9.6&sv=v0.0.1\',
\'../assets/components/core/js/sidebar.kis.init.js?v=v1.9.6\',
\'../assets/components/core/js/core.init.js?v=v1.9.6\',
\'../assets/components/core/js/animations.init.js?v=v1.9.6\'
]
};
</script>
<script>
$script(App.Scripts.core, \'core\');
$script.ready([\'core\'], function(){
$script(App.Scripts.plugins_dependency, \'plugins_dependency\');
});
$script.ready([\'core\', \'plugins_dependency\'], function(){
$script(App.Scripts.plugins, \'plugins\');
});
$script.ready([\'core\', \'plugins_dependency\', \'plugins\'], function(){
$script(App.Scripts.bundle, \'bundle\');
});
</script>
<script>if (/*@cc_on!@*/false && document.documentMode === 10) { document.documentElement.className+=\' ie ie10\'; }</script>