Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Call to undefined function

$
0
0

Replies: 0

Hello. Theme looks nice but on the latest WP (5.9.3) it breaks the Dashboard right after activation. When using the live preview, the following is shown:

Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/.../wp-includes/script-loader.php:2366

That line is part of the following function:

function wp_global_styles_render_svg_filters() {
	/*
	 * When calling via the in_admin_header action, we only want to render the
	 * SVGs on block editor pages.
	 */
	if (
		is_admin() &&
		get_current_screen()->is_block_editor()      <--- line 2366
	) {
		return;
	}

	$filters = wp_get_global_styles_svg_filters();
	if ( ! empty( $filters ) ) {
		echo $filters;
	}
}

Viewing all articles
Browse latest Browse all 59525

Trending Articles