A WordPress-centric search engine for devs and theme authors



paused_plugins_notice ›

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

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



Source

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

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

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

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