Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prevent undefined
get_current_screen
function errors (#39228)
* fix: Prevent undefined `get_current_screen` function errors This function is undefined in certain contexts -- e.g., a REST API request that results in enqueueing assets. Referencing an undefined function results in a fatal error. With the `get_current_screen` function specifically, it is common practice to check the function's existence prior to invoking the it. https://developer.wordpress.org/reference/functions/get_current_screen/#comment-5424 * docs: Add change log entry Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/10815999818 Upstream-Ref: Automattic/jetpack@5ee714f
- Loading branch information