如何为函数列出兼容设备php文件[关闭]

vu8f3i0k  于 5个月前  发布在  PHP
关注(0)|答案(1)|浏览(38)

**已关闭。**此问题为not reproducible or was caused by typos。目前不接受回答。

这个问题是由一个错字或一个无法再重现的问题引起的。虽然类似的问题可能在这里是on-topic,但这个问题的解决方式不太可能帮助未来的读者。
7天前关闭
Improve this question
第一次制作一个网站到WordPress的主题,我正在看一个YouTube视频从2019和他们把所有兼容的设备,但当我去的主题,它说“致命错误:未捕获的错误:未定义的常数“所有”".是否有另一种方式或更好的教程,将有更多的最新信息.

<?php 

// adding the css and js files

function cm_setup() {
  wp_enqueue_style('google-fonts', '//fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;
  0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
  wp_enqueue_style('fontawesome', '//kit.fontawesome.com/a8cbd25639.js');
  wp_enqueue_style('style', get_stylesheet_uri(), NULL, microtime(), all);
  wp_enqueue_script("main", get_theme_file_uri('/js/main.js'), NULL, microtime(), true);
}

add_action('wp_enqueue_scripts', 'cm_setup');

字符串

ev7lccsx

ev7lccsx1#

媒体应该是字符串。请参考文档。

wp_enqueue_style('style', get_stylesheet_uri(), [], '1.0.0', 'all');

字符串
[wp_enqueue_style][1] [1]:https://developer.wordpress.org/reference/functions/wp_enqueue_style/

相关问题