wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_should_concatenate_admin_scripts › WordPress Filter Hooks

Seit7.2.0
Veraltetn/v
› apply_filters( 'wp_should_concatenate_admin_scripts', $concatenate )
Parameter:
  • () concatenate Whether scripts and styles are concatenated. Default true, unless the `CONCATENATE_SCRIPTS` constant is false or `SCRIPT_DEBUG` is true.
    Erforderlich: Ja
Definiert in:
Codex:

Filters whether scripts and styles are concatenated on admin screens and the login screen.

Setting the `$concatenate_scripts` global directly still takes precedence over this filter on the request where it is set. An admin screen settles the global the first time scripts are registered, when the {@see 'wp_default_scripts'} action registers TinyMCE. That can be as early as while plugins load, before the theme's functions.php, whereas the login screen reads this filter only when it prints, to predict what the admin will do. So add a callback when a plugin loads, rather than from a theme or on a later hook, or the admin may not see it while the login screen does.




Quellcode

return (bool) apply_filters( 'wp_should_concatenate_admin_scripts', $concatenate );