wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_prefetch_admin_assets › WordPress Filter Hooks
Seit7.2.0
Veraltetn/v
› apply_filters( 'wp_prefetch_admin_assets', $resources, $next_screen )
| Parameter: (2) |
|
| Definiert in: |
|
| Codex: |
Filters the assets prefetched for the screen the user is expected to open next.
Fires on any screen from which the next one can be predicted, so `$next_screen` is what distinguishes the contexts: the login screen passes the URL it is about to redirect to, and the Dashboard and post list tables pass the editor they expect the user to open. Only the `href` and `as` attributes below are printed; any other key is ignored. Resources sharing an `href` are collapsed to the first of them, so a callback may append without checking what is already there. Returning an empty array turns the prefetching off. On the login screen the URLs are built before the user is authenticated and outside the admin, so there is no current user and `is_admin()` is false. A {@see 'script_loader_src'} or {@see 'style_loader_src'} callback that depends on either can produce a URL the admin screen will not request, which wastes the prefetch; a callback on this filter can correct it.Ähnliche Funktionen: wp_prefetch_admin_assets, wp_redirect_admin_locations, print_admin_styles, wp_admin_css, wp_get_admin_notice, wp_get_link_cats
Ähnliche Hooks: print_admin_styles, wp_admin_css, wp_before_admin_bar_render, wp_refresh_nonces, widgets_admin_page