我只想在3个管理页面上加载样式表:
发布。php?post=7(&P);操作=编辑帖子。php?post=10(&;操作=编辑帖子。php?post=18(&P);操作=编辑我正在尝试admin_enqueue_script
但它似乎没有这种特异性(see my related wpse post), 这让我get_current_screen
. 但是我找到的所有例子和文章get_current_screen
请参阅将其与插件和/或插件选项页面一起使用:
- http://codex.wordpress.org/Function_Reference/get_current_screen#Example
- http://code.tutsplus.com/articles/quick-tip-conditionally-including-js-and-css-with-get_current_screen--wp-25378
- http://amme86.wordpress.com/2013/12/10/25/
I would simply like to use get_current_screen
in my functions.php to determine if the admin page loaded is 1 of the 3 pages and if so load a css file.