admin管理员组文章数量:1516870
In attempting to boost the performance of my website, I've noticed that Wordpress is enqueuing a lot of the admin relevant scripts and stylesheets on the front end.
I'm wondering how I can stop this from happening...I was thinking about dequeueing all of the offending, but then my server response time would be slightly slowed.
Is there a tried and tested way of doing this?
In attempting to boost the performance of my website, I've noticed that Wordpress is enqueuing a lot of the admin relevant scripts and stylesheets on the front end.
I'm wondering how I can stop this from happening...I was thinking about dequeueing all of the offending, but then my server response time would be slightly slowed.
Is there a tried and tested way of doing this?
Share Improve this question asked Apr 5, 2019 at 16:38 Micheal J. RobertsMicheal J. Roberts 1033 bronze badges 9 | Show 4 more comments1 Answer
Reset to default 1If your bootstrap or other enqueued scripts have a dependency or name conflict, this could enqueue all these scripts. There are a large number of common scripts in WordPress core that are enqueued under common names. I always recommend prefixing your script names with something specific.
wp_enqueue_script( 'theme-bootstrap', 'https://stackpath.bootstrapcdn/bootstrap/4.3.1/js/bootstrap.min.js', array( 'jquery' ), '4.3.1', true );
本文标签:
版权声明:本文标题:Why is Wordpress enqueuing admin relevant scripts (e.g., React, ReactDOM, Redux, hooks, TinyMCE etc) when not logged in? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.betaflare.com/web/1745615453a2666372.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


/wp-includes/js/wp-embed.min.jsand/wp-includes/js/wp-emoji-release.min.js. If other scripts are enqueued, something in your theme or plugins must be doing this. – MikeNGarrett Commented Apr 5, 2019 at 16:41