a_z_listing_mbstring_health_check()

The mbstring health check


Description


Return

(array) The health check results.


Source

File: functions/health-check.php

function a_z_listing_mbstring_health_check() {
	$result = array(
		'label'       => __( 'A-Z Listing: PHP mbstring module is enabled', 'a-z-listing' ),
		'status'      => 'good',
		'badge'       => array(
			'label' => __( 'mbstring', 'a-z-listing' ),
			'color' => 'green',
		),
		'description' => sprintf(
			'<p>%s</p>',
			__( 'The mbstring PHP module improves support for non-latin languages in the A-Z Listing plugin.', 'a-z-listing' )
		),
		'actions'     => '',
		'test'        => 'a_z_listing_mbstring_health_check',
	);

	if ( ! extension_loaded( 'mbstring' ) ) {
		$result['status']         = 'recommended';
		$result['label']          = __( 'A-Z Listing: PHP mbstring module is not enabled', 'a-z-listing' );
		$result['badge']['color'] = 'orange';
		$result['description']    = sprintf(
			'<p>%s</p>',
			__( 'The mbstring PHP module is not enabled on your server. This module improves support for non-latin languages in the A-Z Listing plugin.', 'a-z-listing' )
		);
		$result['actions']        = __( 'Contact your web host to request that the mbstring PHP module is enabled for your site.', 'a-z-listing' );
	}

	return $result;
}

Changelog

Changelog
VersionDescription
2.3.0Introduced.

User Contributed Notes

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.