A WordPress-centric search engine for devs and theme authors



paused_themes_notice ›

Since5.1.0
Deprecatedn/a
paused_themes_notice ( No parameters )
Defined at:
Codex:

Renders an admin notice in case some themes have been paused due to errors.



Source

function paused_themes_notice() {
	if ( 'themes.php' === $GLOBALS['pagenow'] ) {
		return;
	}

	if ( ! current_user_can( 'switch_themes' ) ) {
		return;
	}

	if ( ! isset( $GLOBALS['_paused_themes'] ) || empty( $GLOBALS['_paused_themes'] ) ) {
		return;
	}

	printf(
		'<div class="notice notice-error"><p><strong>%s</strong><br>%s</p><p>%s</p></div>',
		__( 'One or more themes failed to load properly.' ),
		__( 'You can find more details and make changes on the Themes screen.' ),
		sprintf(
			'<a href="%s">%s</a>',
			admin_url( 'themes.php' ),
			'Go to the Themes screen'
		)
	);
}